Skip to content

Commit 55613b8

Browse files
Flovajaagut
andauthored
Reset the walk cycle when the manual penalty is activated. (#724)
Co-authored-by: Jan Gutsche <[email protected]> Co-authored-by: Jan Gutsche <[email protected]>
1 parent dc7035b commit 55613b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bitbots_motion/bitbots_quintic_walk/src/walk_node.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ void WalkNode::run() {
115115
// necessary as timer in simulation does not work correctly https://github.com/ros2/rclcpp/issues/465
116116
if (dt != 0.0) {
117117
if (robot_state_ == bitbots_msgs::msg::RobotControlState::FALLING ||
118-
robot_state_ == bitbots_msgs::msg::RobotControlState::GETTING_UP) {
119-
// the robot fell, we have to reset everything and do nothing else
118+
robot_state_ == bitbots_msgs::msg::RobotControlState::GETTING_UP ||
119+
robot_state_ == bitbots_msgs::msg::RobotControlState::PENALTY) {
120+
// The robot fell or the penalty button was pressed.
121+
// We have to reset everything and do nothing else to ensure a stable restart afterwards.
120122
walk_engine_.reset();
121123
stabilizer_.reset();
122124
} else {

0 commit comments

Comments
 (0)