Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Waypoint classes for describing targets with multiple points. #421

Merged
merged 18 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from 15 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 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
Loading