Skip to content

docs: port 7b2462a TOC fix for master#2312

Open
magic-alt wants to merge 2 commits into
ros-controls:masterfrom
magic-alt:fix-motion-primitive-controller-toc-2216
Open

docs: port 7b2462a TOC fix for master#2312
magic-alt wants to merge 2 commits into
ros-controls:masterfrom
magic-alt:fix-motion-primitive-controller-toc-2216

Conversation

@magic-alt
Copy link
Copy Markdown

@magic-alt magic-alt commented Apr 16, 2026

Description

Fixes #2216.

This PR ports the existing TOC/docs fix from commit 7b2462a to master.
It moves the motion_primitives_controllers user documentation into the standard doc/ location and updates the
central controllers index and the doc-related pre-commit ignore path accordingly.

Is this user-facing behavior change?

No.

This is a docs-only change. It does not change runtime behavior, controller APIs, or controller configuration.

Did you use Generative AI?

Yes.

OpenAI Codex (GPT-5-based assistant) was used to help draft the PR description and follow-up review response. The
final wording and changes were reviewed before posting.

Additional Information

Copilot AI review requested due to automatic review settings April 16, 2026 13:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Ports a documentation/TOC fix for motion_primitives_controllers by moving its user documentation into the standard doc/ location and updating the central controllers index accordingly.

Changes:

  • Remove the legacy motion_primitives_controllers/userdoc.rst and add motion_primitives_controllers/doc/userdoc.rst.
  • Add motion_primitives_controllers/doc/README.md to be included from the new RST userdoc via MyST.
  • Update doc/controllers_index.rst and .pre-commit-config.yaml to reference/ignore the new doc path.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
motion_primitives_controllers/userdoc.rst Removed old userdoc file (legacy location).
motion_primitives_controllers/doc/userdoc.rst New Sphinx userdoc entrypoint under doc/ and updated relative includes/paths.
motion_primitives_controllers/doc/README.md New Markdown content intended for inclusion in the rendered user docs.
doc/controllers_index.rst Points the controllers TOC entry to the new doc/userdoc.rst path.
.pre-commit-config.yaml Updates doc8 ignore-path to match the new userdoc location.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +5 to +6
motion_primitive_controllers
==========================================
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

The top-level document title uses motion_primitive_controllers (singular), but the package name (and directory) is motion_primitives_controllers (plural). This will make the generated docs/toctree title inconsistent with the rest of the repository’s controller docs and with the package.xml name. Consider renaming the heading to motion_primitives_controllers to match the actual package name.

Suggested change
motion_primitive_controllers
==========================================
motion_primitives_controllers
===========================================

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +41
## Description

This project provides an interface for sending motion primitives to an industrial robot controller
using the `ExecuteMotionPrimitiveSequence.action` action from
[control_msgs](https://github.com/ros-controls/control_msgs/blob/master/control_msgs/action/ExecuteMotionPrimitiveSequence.action).
The controller receives the primitives via the action interface and forwards them through command
interfaces to the robot-specific hardware interface. Currently, hardware interfaces for
[Universal Robots](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver) and
[KUKA Robots](https://github.com/b-robotized-forks/kuka_experimental/tree/motion_primitive_kuka_driver)
are implemented.

- Supported motion primitives:
- `LINEAR_JOINT`
- `LINEAR_CARTESIAN`
- `CIRCULAR_CARTESIAN`

If multiple motion primitives are passed to the controller via the action, the controller forwards
them to the hardware interface as a sequence. To do this, it first sends
`MOTION_SEQUENCE_START`, followed by each individual primitive, and finally
`MOTION_SEQUENCE_END`. All primitives between these two markers will be executed as a single,
continuous sequence. This allows seamless transitions (blending) between primitives.

The action interface also allows stopping the current execution of motion primitives. When a stop
request is received, the controller sends `STOP_MOTION` to the hardware interface, which then
halts the robot's movement. Once the controller receives confirmation that the robot has stopped,
it sends `RESET_STOP` to the hardware interface. After that, new commands can be sent.

![Action Image](Moprim_Controller_ExecuteMotion_Action.drawio.png)

This can be done, for example, via a Python script as demonstrated in the
[`example python script`](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/main/ur_robot_driver/examples/examples.py)
in the `Universal_Robots_ROS2_Driver` package.

## Command and State Interfaces

To transmit the motion primitives, the following command and state interfaces are required. All
interfaces use the naming scheme `tf_prefix_ + "motion_primitive/<interface name>"` where the
`tf_prefix` is provided to the controller as a parameter.

### Command Interfaces

Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

This doc/README.md largely duplicates the package-level motion_primitives_controllers/README.md (same prose/sections with only path tweaks). Maintaining two copies of the same documentation is likely to cause drift over time. Consider consolidating to a single source of truth (e.g., include ../README.md from the RST and adjust image paths accordingly, or generate one README from the other during docs build).

Suggested change
## Description
This project provides an interface for sending motion primitives to an industrial robot controller
using the `ExecuteMotionPrimitiveSequence.action` action from
[control_msgs](https://github.com/ros-controls/control_msgs/blob/master/control_msgs/action/ExecuteMotionPrimitiveSequence.action).
The controller receives the primitives via the action interface and forwards them through command
interfaces to the robot-specific hardware interface. Currently, hardware interfaces for
[Universal Robots](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver) and
[KUKA Robots](https://github.com/b-robotized-forks/kuka_experimental/tree/motion_primitive_kuka_driver)
are implemented.
- Supported motion primitives:
- `LINEAR_JOINT`
- `LINEAR_CARTESIAN`
- `CIRCULAR_CARTESIAN`
If multiple motion primitives are passed to the controller via the action, the controller forwards
them to the hardware interface as a sequence. To do this, it first sends
`MOTION_SEQUENCE_START`, followed by each individual primitive, and finally
`MOTION_SEQUENCE_END`. All primitives between these two markers will be executed as a single,
continuous sequence. This allows seamless transitions (blending) between primitives.
The action interface also allows stopping the current execution of motion primitives. When a stop
request is received, the controller sends `STOP_MOTION` to the hardware interface, which then
halts the robot's movement. Once the controller receives confirmation that the robot has stopped,
it sends `RESET_STOP` to the hardware interface. After that, new commands can be sent.
![Action Image](Moprim_Controller_ExecuteMotion_Action.drawio.png)
This can be done, for example, via a Python script as demonstrated in the
[`example python script`](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/main/ur_robot_driver/examples/examples.py)
in the `Universal_Robots_ROS2_Driver` package.
## Command and State Interfaces
To transmit the motion primitives, the following command and state interfaces are required. All
interfaces use the naming scheme `tf_prefix_ + "motion_primitive/<interface name>"` where the
`tf_prefix` is provided to the controller as a parameter.
### Command Interfaces
## Documentation
This file intentionally avoids duplicating the package documentation.
The package-level [`../README.md`](../README.md) is the single source of truth for the project
description, supported motion primitives, command/state interfaces, usage examples, and images.
Please update that file instead of maintaining a second copy here.
For the full documentation, see:
- [`../README.md`](../README.md)

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@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.

please fill out the description template as requested.

@magic-alt
Copy link
Copy Markdown
Author

please fill out the description template as requested.

Thanks for the review. I filled out the PR description template and updated the PR body accordingly. I also fixed
the document title to match the package name for consistency. Please take another look.

@christophfroehlich
Copy link
Copy Markdown
Member

Isn't this trying to fix the same as #2221 ?

@magic-alt
Copy link
Copy Markdown
Author

Isn't this trying to fix the same as #2221 ?
Yes — it targets the same issue as #2221. My intent with #2312 was to provide a smaller, focused port of the original 7b2462a fix, since #2221 seems to have evolved during review. Happy to close this if you'd rather continue with #2221 only.

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.

[Docs] motion_primitive_controller TOC is broken

3 participants