Skip to content

Conversation

mathias31415
Copy link
Contributor

This PR adds the motion_primitives_forward_controller, a controller for forwarding motion primitive commands to motion-primitive-capable hardware interfaces.
It was developed alongside the motion_primitive_ur_driver and is intended to support future hardware interfaces for additional robot manufacturers.
The corresponding PR for integrating the motion_primitive_ur_driver into the official Universal Robots ROS 2 driver can be found here: UniversalRobots/Universal_Robots_ROS2_Driver#1341.

The controller subscribes to MotionPrimitive.msg from the industrial_robot_motion_interfaces package. The MotionPrimitive.msg has been extended with additional helper types:

  • STOP_MOTION: Immediately interrupts execution and clears all queued primitives.
  • MOTION_SEQUENCE_START and MOTION_SEQUENCE_END: Define a sequence of primitives to be executed as a blended motion block.

The controller uses the following interfaces:

Command Interfaces

  • motion_type: Type of motion primitive (e.g., LINEAR_JOINT, LINEAR_CARTESIAN, CIRCULAR_CARTESIAN, etc.)
  • q1q6: Target joint positions for joint-based motion
  • pos_x, pos_y, pos_z: Target Cartesian position
  • pos_qx, pos_qy, pos_qz, pos_qw: Orientation quaternion of the target pose
  • pos_via_x, pos_via_y, pos_via_z: Intermediate via-point position for circular motion
  • pos_via_qx, pos_via_qy, pos_via_qz, pos_via_qw: Orientation quaternion of via-point
  • blend_radius: Blending radius for smooth transitions
  • velocity: Desired motion velocity
  • acceleration: Desired motion acceleration
  • move_time: Optional duration for time-based execution

State Interfaces

  • execution_status: Indicates the current execution state of the primitive.
  • ready_for_new_primitive: Boolean flag indicating whether the interface is ready to receive a new motion primitive

I'd appreciate any feedback or suggestions – thanks in advance!

Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of stuff coming from templates in this PR and you either used some AI tool for coding or you are very good at writing AI-style comments.

Please try removing all commented code or fix them and remove all comments that add nothing to the code itself (which in this code is almost all comments...)

@mathias31415
Copy link
Contributor Author

Thanks @christophfroehlich for your review. I addressed all your comments. Looking forward to your feedback.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I haven't realized earlier that you have written the documentation in a README.md file. This won't be published on control.ros.org per default.
You can either convert it to an rst document and add it to the index here,
or you import it to a rst wrapper (like here) and add this rst file again to the index.

Apart from that LGTM.

@mathias31415
Copy link
Contributor Author

Oh, I haven't realized earlier that you have written the documentation in a README.md file. This won't be published on control.ros.org per default. You can either convert it to an rst document and add it to the index here, or you import it to a rst wrapper (like here) and add this rst file again to the index.

Apart from that LGTM.

@christophfroehlich Could you help me properly include the RST file? I’m getting the doc8 error: No module named 'myst_parser'. What am I missing?

@mathias31415
Copy link
Contributor Author

Oh, I haven't realized earlier that you have written the documentation in a README.md file. This won't be published on control.ros.org per default. You can either convert it to an rst document and add it to the index here, or you import it to a rst wrapper (like here) and add this rst file again to the index.
Apart from that LGTM.

@christophfroehlich Could you help me properly include the RST file? I’m getting the doc8 error: No module named 'myst_parser'. What am I missing?

@christophfroehlich i just saw, that you added '--ignore-path=doc/index.rst' in control_toolbox

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the missing doc job by moving the rst file at the same location as the readme, otherwise the relative paths to the images don't work from the doc folder. Idk how to tell myst_parser.sphinx_ to use the path relative from the markdown file.

@christophfroehlich christophfroehlich merged commit 5ed4fa5 into ros-controls:master Aug 24, 2025
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants