Summary
Ros2VelocityInput._callback() currently hardcodes the velocity clamp range to [-1, 1]:
self.policy.lin_vel_command[0, 0] = max(-1.0, min(1.0, msg.twist.linear.x))
The training range may differ per model. This should follow the same resolution pattern as KP/KD:
- ONNX metadata — read
vel_range (or similar) from model metadata
- Config/CLI override —
--task.velocity-range to explicitly set the range
- Default — fall back to
[-1, 1] if neither source provides a value
Context
Introduced in PR #89 (input provider model). The clamp values are correct for current models but should be configurable for future ones.
Acceptance criteria
Summary
Ros2VelocityInput._callback()currently hardcodes the velocity clamp range to[-1, 1]:The training range may differ per model. This should follow the same resolution pattern as KP/KD:
vel_range(or similar) from model metadata--task.velocity-rangeto explicitly set the range[-1, 1]if neither source provides a valueContext
Introduced in PR #89 (input provider model). The clamp values are correct for current models but should be configurable for future ones.
Acceptance criteria
[-1, 1]when neither is providedRos2VelocityInput._callback()(and any future velocity providers that need clamping)