-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Environment
- OS: Ubuntu 22.04
- ROS2: Humble
1. TextOpTracker: Mujoco evaluation works as expected
I can successfully run the Mujoco evaluation in TextOpTracker:
(env_isaaclab) ehzoah@ehzoah-desktop:~/textop/textop/TextOpTracker$ python scripts/deploy_mujoco.py \
--motion_path=/home/ehzoah/textop/textop/TextOpTracker/artifacts/shoulder_motions/50002_shake_shoulders_stageii/motion.npz \
--policy_path=/home/ehzoah/textop/textop/TextOpTracker/logs/rsl_rl/Pretrained/checkpoints/exported/policy.onnxThe script runs without errors and prints key parameters such as kp, kd, action_scale, default joint positions, and joint reindex mappings.
The Mujoco simulation completes all 105 timesteps successfully.
Example logs:
kp: [ 200. 200. ... 200.]
kd: [10. 10. ... 10.]
action_scale: 0.5
default_angles_: 0 0 -0.4 0.8 -0.4 0 ...
mujoco_to_isaaclab_reindex_: 0 1 2 ... 28
isaaclab_to_mujoco_reindex_: 0 1 2 ... 28
Note: some timestep logs appear truncated due to stdout formatting, but the simulation completes all 105 steps normally.
2. TextOpDeploy: ONNX controller fails without RobotMDAR
Terminal 1 – Launch Mujoco simulation
(textop) ehzoah@ehzoah-desktop:~/textop/textop/TextOpDeploy/src/unitree_mujoco/simulate/build$ ./unitree_mujoco -r g1 -n enp0s31f6 -i 0The simulation initializes successfully with all links, joints, actuators, and sensors (29 DOF).
Terminal 2 – Launch ONNX controller
(textop) ehzoah@ehzoah-desktop:~/textop/textop/TextOpDeploy$ ros2 launch textop_ctrl textop_onnx_controller.launch.py \
onnx_model:=/home/ehzoah/textop/textop/TextOpTracker/logs/rsl_rl/Pretrained/checkpoints/exported/policy.onnx \
motion_file:=/home/ehzoah/textop/textop/TextOpTracker/artifacts/shoulder_motions/50002_shake_shoulders_stageii/motion.npz \
config_file:=/home/ehzoah/textop/textop/TextOpDeploy/install/textop_ctrl/share/textop_ctrl/config/g1_29dof.yamlThe controller initializes successfully:
- ONNX model loaded
- Motion file loaded
- Observation dimension:
[1, 431] - Action dimension:
[1, 29] - Default joint angles and reindex mappings printed
However, the controller immediately exits due to a delta-q safety check:
[textop_onnx_controller-1] [ERROR]: delta q 0 is too large.
[textop_onnx_controller-1] target q : 3.344359
[textop_onnx_controller-1] target dq : 0.000000
[textop_onnx_controller-1] q : -0.348966
[textop_onnx_controller-1] dq : -7.031245
[textop_onnx_controller-1] [ERROR]: Safe exit triggered - shutting down controller
Terminal 3 – Publish motion
(py310) ehzoah@ehzoah-desktop:~/textop/textop/TextOpDeploy$ python src/textop_ctrl/scripts/npz_motion_publisher.py --mode single /home/ehzoah/textop/textop/TextOpTracker/artifacts/shoulder_motions/50002_shake_shoulders_stageii/motion.npzThe motion is published successfully, but the controller still exits with the same delta-q error.
Question:
I am puzzled why the same ONNX policy and motion file work correctly in TextOpTracker Mujoco evaluation, but testing the ONNX controller in TextOpDeploy fails without RobotMDAR. Is there an extra configuration or step required for the deploy part that I might be missing?
Any guidance would be greatly appreciated.