Skip to content

Commit 4f4e46a

Browse files
authored
Fix motor start delay in sim (#638)
2 parents 6d50151 + 586f8f8 commit 4f4e46a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

bitbots_motion/bitbots_hcm/bitbots_hcm/hcm_dsd/hcm_blackboard.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ def __init__(self, node: Node):
3333
self.visualization_active: bool = self.node.get_parameter("visualization_active").value
3434
self.pickup_accel_threshold: float = self.node.get_parameter("pick_up_accel_threshold").value
3535
self.pressure_sensors_installed: bool = self.node.get_parameter("pressure_sensors_installed").value
36-
self.motor_start_delay: int = get_parameters_from_other_node_sync(
37-
self.node, "/wolfgang_hardware_interface", ["start_delay"]
38-
)["start_delay"]
36+
self.motor_start_delay: int = 0
37+
if not self.simulation_active: # The hardware interface is obviously not available in simulation
38+
self.motor_start_delay = get_parameters_from_other_node_sync(
39+
self.node, "/wolfgang_hardware_interface", ["start_delay"]
40+
)["start_delay"]
3941

4042
# Create service clients
4143
self.foot_zero_service = self.node.create_client(EmptySrv, "set_foot_zero")

0 commit comments

Comments
 (0)