Add dry run as debug option to debug config - #177
Open
tomasz-lewicki wants to merge 5 commits into
Open
Conversation
Add task.debug.dry_run (default False). When set, the policy runs the full loop — obs, inference, postprocess, telemetry — but skips send_low_command, so no torque reaches the robot. Logs a one-time yellow warning so it's unmistakable that commands are suppressed. Intended for on-hardware bring-up: verify the obs pipeline (pair with print_observations) and end-to-end wiring without the robot moving. Enable via CLI: --task.debug.dry-run
dryer_run swaps in a SyntheticInterface that returns a plausible standing state (default pose, upright IMU, zero velocities) and never opens a DDS connection, so the policy loop runs off-robot with no sim or hardware present. Implies dry_run (never sends commands).
SyntheticInterface.send_low_command now publishes the policy's would-be commands as sensor_msgs/JointState on a synthetic topic (/dryer_run/cmd) that no real driver subscribes to, so the loop's output is measurable (ros2 topic hz/echo/bag) while nothing reaches the robot. Falls back to a no-op if ROS2 is unavailable. Send gate branches: dry_run skips send (real interface), dryer_run calls it (synthetic topic only).
Ctrl-C/SIGTERM can invalidate the rclpy context mid-publish; check rclpy.ok() and swallow the publish exception so exit stays clean.
ORT defaults its intra-op pool to CPU count and pins one worker per core via sched_setaffinity, which bypasses isolcpus and lands workers on the isolated RT cores (10-13), contending with the 1 kHz EtherCAT actuator threads. The policy is a small MLP at 50 Hz (~1ms single-threaded), so force intra/inter_op=1, sequential exec, and clear intra_op_thread_affinities so ORT never per-core-pins. Fixes run_policy showing up on cores 11/12.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add task.debug.dry_run (default False). When set, the policy runs the full loop — obs, inference, postprocess, telemetry — but skips send_low_command, so no torque reaches the robot. Logs a one-time yellow warning so it's unmistakable that commands are suppressed. Intended for on-hardware bring-up: verify the obs pipeline (pair with print_observations) and end-to-end wiring without the robot moving.
Enable via CLI: --task.debug.dry-run
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.