Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- name: Install
run: |
python -m pip install --no-cache-dir -r requirements-dev.txt
pip install --no-cache-dir -e .
- name: Run integration tests
run: |
pytest --doctest-modules
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
* Replaced the deprecated `draw_frame` function with `frame_to_rhino_plane` in the *Visualize Trajectory* GhPython component to restore correct frame visualization.

### Removed

Expand Down
29 changes: 27 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,28 @@ We love pull requests from everyone! Here's a quick guide to improve the code:

1. Fork `the repository <https://github.com/compas-dev/compas_fab>`_ and clone the fork.
2. Create a virtual environment using your tool of choice (e.g. ``virtualenv``, ``conda``, etc).
3. Install development dependencies:
3. Install the development dependencies:

::

pip install -r requirements-dev.txt
pip install -e .

4. From the `compas_fab` directory, run the docker containers:
.. note::

**Windows users:** The ``pybullet`` package often fails to build from source when installed
via ``pip`` due to missing C++ build tools.
To avoid this, **comment out the ``pybullet`` line in ``requirements-dev.txt``** before running
``pip install -r requirements-dev.txt`` and then install ``pybullet`` separately using:

::

conda install -c conda-forge pybullet

This ensures that the precompiled conda-forge package is used instead of attempting
to compile ``pybullet`` from source.

1. From the `compas_fab` directory, run the docker containers:

::

Expand All @@ -30,6 +45,16 @@ We love pull requests from everyone! Here's a quick guide to improve the code:

invoke test --doctest --codeblock

.. note::

If you see the error ``No idea what '--codeblock' is!'', it means your version of the
task definitions does not support the ``--codeblock`` option.
In that case, simply remove ``--codeblock`` and run:

::

invoke test --doctest

6. Start making your changes to the **main** branch (or branch off of it).
7. Make sure all tests still pass:

Expand Down
3 changes: 1 addition & 2 deletions src/compas_fab/ghpython/components/Cf_RosRobot/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
COMPAS FAB v1.1.2
"""

from compas.scene import SceneObject
from compas_ghpython import create_id
from ghpythonlib.componentbase import executingcomponent as component
from scriptcontext import sticky as st

from compas.scene import SceneObject


class ROSRobot(component):
def RunScript(self, ros_client, load):
Expand Down
6 changes: 3 additions & 3 deletions src/compas_fab/ghpython/components/Cf_VisualizeRobot/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

import time

from compas.geometry import Frame
from compas.geometry import Transformation
from compas.scene import SceneObject
from compas_ghpython import create_id
from compas_rhino.conversions import frame_to_rhino_plane
from ghpythonlib.componentbase import executingcomponent as component
from scriptcontext import sticky as st

from compas.geometry import Frame
from compas.geometry import Transformation
from compas.scene import SceneObject
from compas_fab.backends import BackendFeatureNotSupportedError
from compas_fab.robots import PlanningScene

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
COMPAS FAB v1.1.2
"""

from compas_ghpython import draw_frame
from compas_ghpython.sets import list_to_ghtree
from compas_rhino.conversions import frame_to_rhino_plane
from ghpythonlib.componentbase import executingcomponent as component


Expand All @@ -29,7 +29,7 @@ def RunScript(self, robot, group, trajectory):
robot.merge_group_with_full_configuration(c, trajectory.start_configuration, group)
)
frame = robot.forward_kinematics(c, group, options=dict(solver="model"))
planes.append(draw_frame(frame))
planes.append(frame_to_rhino_plane(frame))
positions.append(c.positions)
velocities.append(c.velocities)
accelerations.append(c.accelerations)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
"""

import Grasshopper
from compas.scene import SceneObject
from compas_ghpython import create_id
from scriptcontext import sticky as st

from compas.scene import SceneObject


class ROSRobot(Grasshopper.Kernel.GH_ScriptInstance):
def RunScript(self, ros_client, load):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import time

import Grasshopper
from compas.geometry import Frame
from compas.geometry import Transformation
from compas.scene import SceneObject
from compas_ghpython import create_id
from compas_rhino.conversions import frame_to_rhino_plane
from scriptcontext import sticky as st

from compas.geometry import Frame
from compas.geometry import Transformation
from compas.scene import SceneObject
from compas_fab.backends import BackendFeatureNotSupportedError
from compas_fab.robots import PlanningScene

Expand Down
3 changes: 1 addition & 2 deletions src/compas_fab/ghpython/reachabilitymapobject.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from compas_ghpython.scene import GHSceneObject

from compas.colors import ColorMap
from compas.scene import SceneObject
from compas_ghpython.scene import GHSceneObject


class ReachabilityMapObject(GHSceneObject):
Expand Down
3 changes: 1 addition & 2 deletions src/compas_fab/rhino/reachabilitymapobject.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from compas_rhino.scene import RhinoSceneObject

from compas.colors import ColorMap
from compas.scene import SceneObject
from compas_rhino.scene import RhinoSceneObject


class ReachabilityMapObject(RhinoSceneObject):
Expand Down
Loading