diagnostics.recorder¶
Recorder: logs the run, plots it, and triggers the MuJoCo animation render.
Toggled by record:=true in the bringup launch. It subscribes to the joint states and the line-tension sensor, buffers the time series, and on shutdown:
Writes a PNG with joint positions, motor effort (torque) and the measured vs target line tension (so you can see if tension is held constant).
Saves the raw time series + the joint trajectory to an .npz file.
Auto-spawns the offscreen animation renderer (render_animation.py) under the .venv python, because MuJoCo lives there, not in the ROS python env.
Everything here uses only rclpy + numpy + matplotlib (all available to the ROS python), keeping the node light; the heavy MuJoCo rendering is a separate process fed the .npz.
Classes¶
Functions¶
|
Module Contents¶
- class diagnostics.recorder.Recorder¶
Bases:
rclpy.node.Node- save_and_render()¶
- arm_joints¶
- auto_render¶
- eff¶
- eff_t = []¶
- js_t = []¶
- mjcf_path¶
- output_dir¶
- qpos_joints¶
- qpos_rows = []¶
- render_script¶
- ten = []¶
- ten_t = []¶
- ten_target = []¶
- venv_python¶
- video_format¶
- video_fps¶
- diagnostics.recorder.main(args=None)¶