Skip to content

Added 4th section regarding robot control.#10

Open
michalpelka wants to merge 6 commits intomainfrom
mp/control
Open

Added 4th section regarding robot control.#10
michalpelka wants to merge 6 commits intomainfrom
mp/control

Conversation

@michalpelka
Copy link
Copy Markdown

@michalpelka michalpelka commented Mar 30, 2026

Added robot control proposal.

Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Added `ROS2JointStateBroadcasterAPI`.
Created differentiation between `ROS2IntegratedControlAPI` and `Ros2IntegratedControlAPI`.
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
@michalpelka
Copy link
Copy Markdown
Author

Applied ROS 2 is ROS for schema as well in this PR. Tested with usdcat and usdGenSchema.py.

@michalpelka michalpelka requested a review from zakmat April 7, 2026 08:36
Co-authored-by: Michał Pełka <michal.pelka@robotec.ai>
Copy link
Copy Markdown
Member

@adamdbrw adamdbrw left a comment

Choose a reason for hiding this comment

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

Strong contribution, thank you @michalpelka. I have some comments per sections, and please also consider to make it more concise (I am slowly applying this over entire REP).

- `rel ros:rigid_body_twist:body`: Reference to a prim with
`UsdPhysicsRigidBodyAPI` for applying velocities.

- `double ros:rigid_body_twist:cmd_vel_timeout`: Timeout in seconds after
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems to be a runtime deployment parameter, not a piece of an asset. The argument for is plug-and-play assets, batteries included approach. At most, I would keep all such parameters separate and as "hints" to streamline plug-and-play operation of robot.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This approach could work if tooling supports parameters override through ros2 param set / params.yaml

and the controller should publish odometry data to a topic with type `nav_msgs/Odometry`.
Implementation should follow logic similar to the `diff_drive_controller` in `ros2_controllers` package.

- `rel ros:diff_drive:subscriber`: Reference to prim with `ROSTopicAPI` for subscribing to velocity commands.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- `rel ros:diff_drive:subscriber`: Reference to prim with `ROSTopicAPI` for subscribing to velocity commands.
- `rel ros:diff_drive:subscriber`: relationship targeting a prim with the RosTopicAPI with `role="subscription"` that provides the velocity commands for this controller.

- `rel[] ros:diff_drive:right_wheels`: References to prims with `UsdPhysicsDriveAPI` representing right wheel joints.
- `double ros:diff_drive:wheel_separation`: Distance between left and right wheels in meters.
- `double ros:diff_drive:wheel_radius`: Radius of the wheels in meters.
- `double ros:diff_drive:cmd_vel_timeout`: Timeout in seconds after which the command is considered stale. Default: `0.5`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See the other comment on cmd_vel_timeout

- `rel ros:joint_trajectory:server`: Reference to a prim with `ROSActionAPI`
for receiving trajectory action goals.
- `rel[] ros:joint_trajectory:command_joints`: References to prims with `UsdPhysicsJointAPI`.
- `double ros:joint_trajectory:action_monitor_rate`: Frequency in Hz for
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similarly, this is a dynamic parameter, and so is the timeout (below).

Implementation needs to check the name for [custom joint names](rep.md#29-custom-names-to-ros-joints) in `ros:joint:name`
property of the joint prims and use it for mapping trajectory points to joints in the simulator.

- `rel ros:joint_state_broadcaster:publisher`: Reference to a prim with `ROSTopicAPI` for publishing joint state data.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- `rel ros:joint_state_broadcaster:publisher`: Reference to a prim with `ROSTopicAPI` for publishing joint state data.
- `rel ros:joint_state_broadcaster:publisher`: relationship targeting a prim with the RosTopicAPI with `role="publisher"` for joint state data.


- `rel ros:joint_state_broadcaster:publisher`: Reference to a prim with `ROSTopicAPI` for publishing joint state data.
- `rel[] ros:joint_state_broadcaster:joints`: References to prims with `UsdPhysicsJointAPI` representing the joints whose states are to be broadcast.
- `double ros:joint_state_broadcaster:publish_rate`: Frequency in Hz at which joint states are published.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dynamic parameter.

OpenUSD cameras natively face the -Z axis, whereas ROS optical frames (REP 103) must face +Z. To bridge this without opaque simulator-side rotations, authors must decouple the physical sensor from its optical interface. Authors must create a child UsdGeomXform (e.g., `camera_optical_frame`) rotated 180 degrees around its local X-axis. All RosTopicAPI and RosFrameAPI schemas must be applied exclusively to this optical frame, ensuring deterministic data orientation in RViz.

---
### 2.9 Custom names to ROS joints.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to align with IsaacJointAPI isaac:nameOverride so that there is no duplication for Isaac Sim assets. Since this PR is more general (e.g. does not name a particular simulator), I would opt for this approach. @ayushgnv could you comment? Perhaps there is an extra rationale for this attribute in-schema?


In application level simulation, the simulator simulates the robot as a whole, including its physical properties, kinematics, and dynamics.
This approach is meant to be used for application testing (e.g. whole robotics stacks, mapping, localization frameworks).
In this approach the controller is integrated in the simulator codebase and managed by parameters of the prim and ROS communication.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would love a connection to assets here - how these approaches reflect on OpenUSD assets (this can be deduced but lets make it clear).

* **API Translation:** Ros*API schemas must map exclusively to modern extension blocks (e.g., SDF `<plugin>`, MJCF `<extension>`). Obsolete approaches such as injecting legacy `<gazebo>` tags into URDF are not allowed.
* **Discard, not inject:** OpenUSD-native metadata (layer stacks, unselected variants) must be cleanly discarded. Injecting custom, non-standard XML elements to store unmappable OpenUSD states is not recommended. If pipeline necessitates it for practicality, such metadata must be confined to valid, format-native extension points.

## 4. Robot Control
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see this as a good approach:

  • Most representative cases are covered by convenience application-level schemas.
  • Developers should fall back to generic hardware-level interfaces for other cases (which there are multiple of).
    However, this is not clear from the reading - could you please rephrase this intro chapter and add extra clarifications in the sub-chapters as well? Someone could be confused and ask "where's the Ackermann, what about my custom ML policies"? Also, please refer to ML policies directly as this is a key aspect.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Regarding the dynamic parameters - it would be great to address that these are only hints, and should be subject to tuning / overrides.

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.

2 participants