From 7274d409132173e38498e8198b451a710c53dce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Fri, 11 Oct 2024 19:23:51 +0200 Subject: [PATCH] minor: Log wheel radius on startup --- pink_balancer/whole_body_controller.py | 1 - run_agent.py | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pink_balancer/whole_body_controller.py b/pink_balancer/whole_body_controller.py index 8fcb9b6..baeffe3 100644 --- a/pink_balancer/whole_body_controller.py +++ b/pink_balancer/whole_body_controller.py @@ -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) diff --git a/run_agent.py b/run_agent.py index f068316..1e8e47e 100644 --- a/run_agent.py +++ b/run_agent.py @@ -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: