Skip to content

Use with AI

Use with AI

Runtime commands from ROS 2 ​

The opt-in command adapter forwards all 48 northbound Runtime RPCs. The existing read adapter, isolated Gazebo world and offline MoveIt launch keep their existing scopes. This adapter is not ros2_control or a hardware driver.

Launch against the command fixture ​

Start the HORST S5 testkit with --profile horst600s5 --scenario continuous --enable-commands. First install the wheel and ROS overlay using the pinned setup, then explicitly select the fixture as the command target.

bash
ros2 run plexa_ros_read command_adapter --ros-args \
  -p endpoint:=127.0.0.1:19040 \
  -p source_kind:=fixture -p target_id:=fixture-horst600-s5 \
  -p robot_name:=HORST600_S5 -p enable_commands:=true

The adapter checks Runtime-reported identity before each request. It requires an enabled simulation target and rejects hardware or unexpected target IDs. For the local G2 simulator choose source_kind:=simulator, target_id:=simulator-horst-600, robot_name:=HORST and its reachable gRPC endpoint. WSL connectivity must be configured as in RViz.

Correlated RPC topics ​

bash
ros2 topic echo /plexa/runtime/response std_msgs/msg/String
ros2 topic pub --once /plexa/runtime/request std_msgs/msg/String \
  "{data: '{\"requestId\":\"ros-output-1\",\"rpc\":\"SetOutput\",\"request\":{\"name\":\"fixture-output\",\"value\":1}}'}"

requestId, rpc and protobuf JSON request identify an operation. Responses preserve the ID, complete data or Runtime error and source identity. samples selects 1..20 values for any of the six streams; that subscription is then cancelled. The default read adapter remains the continuous joint/TF view. The command queue is bounded, and no command is automatically retried.

FollowJointTrajectory ​

The action /plexa/runtime/follow_joint_trajectory forwards a valid ROS trajectory to ExecuteTrajectory. All configured joint names must appear exactly once. Positions, velocities and accelerations are reordered and converted from radians to degrees. At least two points are required, starting at zero with strictly increasing, uniform sample spacing. Optional dynamics must be present in all samples or absent in all.

The adapter performs no interpolation, retiming or planning. It rejects joint effort, scheduled starts, multi-DOF trajectories and ROS tolerances that the current Runtime Contract cannot represent. Action success requires Runtime completion; cancellation sends StopMotion and checks the terminal state. Failure/timeout requests a stop and reports an unknown stop outcome if the transport cannot confirm it. This is polling with a bounded deadline, not a realtime controller.

Run env/check-runtime-commands.py in the pinned ROS/SDK environment for an owned fixture graph covering topic writes/readback, streams, action completion, cancellation and invalid timing. The existing offline MoveIt launcher still sets allow_trajectory_execution=false; it is not silently connected to this action. A caller can explicitly submit a uniformly sampled proposal to Runtime. The adapter operates with the admitted fixture/simulator targets; physical execution requires its own Runtime admission and safety configuration.