Skip to content

Commit

Permalink
Merge pull request #421 from compas-dev/feature-multiple-targets-wayp…
Browse files Browse the repository at this point in the history
…oints

Introduce Waypoint classes for describing targets with multiple points.
  • Loading branch information
gonzalocasas authored May 31, 2024
2 parents 17c8801 + 56f2984 commit 506fd5e
Show file tree
Hide file tree
Showing 7 changed files with 606 additions and 83 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

* Added `compas_fab.robots.Waypoints` class to represent a sequence of targets. It has two child classes: `FrameWaypoints` and `PointAxisWaypoints`.
* Added `compas_fab.robots.Target` class to represent a motion planning target.
* Added also child classes `FrameTarget`, `PointAxisTarget`, `ConfigurationTarget`, `ConstraintSetTarget`
* Unlike previous constraints, `Targets` do not contain `group` as parameter. Instead, group parameter is passed to the planning call.
Expand Down
13 changes: 11 additions & 2 deletions src/compas_fab/robots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
CollisionMesh
PlanningScene
Targets
-------
Targets and Waypoints
---------------------
.. autosummary::
:toctree: generated/
Expand All @@ -58,6 +58,9 @@
PointAxisTarget
ConfigurationTarget
ConstraintSetTarget
Waypoints
FrameWaypoints
PointAxisWaypoints
Constraints
-----------
Expand Down Expand Up @@ -132,6 +135,9 @@
PointAxisTarget,
ConfigurationTarget,
ConstraintSetTarget,
Waypoints,
FrameWaypoints,
PointAxisWaypoints,
)
from .time_ import (
Duration,
Expand Down Expand Up @@ -160,13 +166,15 @@
"ConstraintSetTarget",
"Duration",
"FrameTarget",
"FrameWaypoints",
"Inertia",
"JointConstraint",
"JointTrajectory",
"JointTrajectoryPoint",
"OrientationConstraint",
"PlanningScene",
"PointAxisTarget",
"PointAxisWaypoints",
"PositionConstraint",
"ReachabilityMap",
"DeviationVectorsGenerator",
Expand All @@ -177,6 +185,7 @@
"Target",
"Tool",
"Trajectory",
"Waypoints",
"Wrench",
"to_degrees",
"to_radians",
Expand Down
3 changes: 2 additions & 1 deletion src/compas_fab/robots/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,8 @@ def from_frame(cls, frame_WCF, tolerance_position, link_name, tool_coordinate_fr
if tool_coordinate_frame:
frame_WCF = from_tcf_to_t0cf(frame_WCF, tool_coordinate_frame)

sphere = Sphere(radius=tolerance_position, point=frame_WCF.point)
radius = float(tolerance_position)
sphere = Sphere(radius, point=frame_WCF.point)
return cls.from_sphere(link_name, sphere, weight)

@classmethod
Expand Down
Loading

0 comments on commit 506fd5e

Please sign in to comment.