Check embodiment compatibility
The model expects the cameras and state conventions of the YAM rig. Your application translates between that format and the software of your robot.Implement the control loop
- Subscribe to
action_predictionandprediction_failed. Connect, and wait forREADY. Start to publish all three camera tracks at 15 fps. - Send the task. Keep sending the measured robot state, at least the last 25 rows. The first reply
has
step: 0and 21 rows. - Check that all values are finite. Then check that the targets stay in the position, speed, acceleration, and workspace limits of your robot.
- Give the targets to your controller. The rows are 1/15th of a second apart. Use
timestampsto schedule them. - After execution, send the measured state. Then send
set_executed_stepwith the receivedstep. This tells the model that it can calculate the next chunk. - Keep only one chunk outstanding at a time. Expect
stepto increase by one with each reply. - If you receive
prediction_failedor the connection stops, hold or stop the robot with your controller. Follow the safety policy of your application. After a failure, the next chunk starts a new episode. After a lost connection, start a new session.
Validate on your rig
Before you connect your integration to hardware, test it with the simulator adapter or with recorded observations. On your robot, first disable movement. Capture observations, inspect the predictions, and check these points:- Each camera sends to the correct track.
- The poses use the correct frame and units.
- The open and closed gripper values are not reversed.
Observation timing
Camera images and robot state travel separately. They can arrive at the model at different times, even when you capture them together. Record the capture times in your application. Decide how old an observation can be before you discard it. Thestep counter of a reply does not show when its input
images were captured.