Skip to content

Commit

Permalink
[Ninja][Navigation] Add joy command to reset target com pos during ps…
Browse files Browse the repository at this point in the history
…eudo assembly state.
  • Loading branch information
sugihara-16 committed Jan 27, 2025
1 parent 6d091dd commit 4defd51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions robots/ninja/src/ninja_navigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,11 @@ void NinjaNavigator::joyStickControl(const sensor_msgs::JoyConstPtr & joy_msg)
int raw_right_cmd = joy_cmd.buttons[PS3_BUTTON_CROSS_RIGHT];
int raw_left_cmd = joy_cmd.buttons[PS3_BUTTON_CROSS_LEFT];
pseudo_cog_com_dist_ += (raw_right_cmd - raw_left_cmd) * pseudo_radius_change_rate_;

if(joy_cmd.buttons[PS3_BUTTON_ACTION_TRIANGLE] == 1 && joy_cmd.buttons[PS3_BUTTON_CROSS_UP] == 1)
{
setTargetCoMPoseFromCurrState();
}
}

BeetleNavigator::joyStickControl(copied_joy_msg);
Expand Down

0 comments on commit 4defd51

Please sign in to comment.