Skip to content

Commit

Permalink
minor: Log wheel radius on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-caron committed Oct 11, 2024
1 parent 9bf630f commit 7274d40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion pink_balancer/whole_body_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def __init__(
turning_gain_scale: Additional gain scale added when the robot
is turning to keep the legs stiff in spite of the ground
pulling them apart.
visualize: If true, open a MeshCat visualizer on the side.
"""
self.gain_scale = clamp(gain_scale, 0.1, 2.0)
self.height_controller = HeightController(visualize=visualize)
Expand Down
7 changes: 4 additions & 3 deletions run_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ def run(
controller = WholeBodyController(visualize=args.visualize)
spine_config = upkie.config.SPINE_CONFIG.copy()
wheel_radius = controller.wheel_controller.wheel_radius
wheel_odometry_config = spine_config["wheel_odometry"]
wheel_odometry_config["signed_radius"]["left_wheel"] = +wheel_radius
wheel_odometry_config["signed_radius"]["right_wheel"] = -wheel_radius
wheel_odometry = spine_config["wheel_odometry"]
wheel_odometry["signed_radius"]["left_wheel"] = +wheel_radius
wheel_odometry["signed_radius"]["right_wheel"] = -wheel_radius
logging.info(f"Wheel radius: {wheel_radius} m")
try:
run(spine, spine_config, controller)
except KeyboardInterrupt:
Expand Down

0 comments on commit 7274d40

Please sign in to comment.