Skip to content

Commit

Permalink
キックをOFFにせずにドリブラーを止めるAPIを追加 (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo authored Aug 18, 2024
1 parent 7523a63 commit fe6da63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crane_robot_skills/include/crane_robot_skills/kick.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class Kick : public SkillBase<RobotCommandWrapperPosition>
if (getParameter<bool>("with_dribble")) {
command.dribble(getParameter<double>("dribble_power"));
} else {
command.dribble(0.0);
// ドリブラーを止める
command.withDribble(0.0);
}
// TODO(HansRobo): 終了判定
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ class RobotCommandWrapperCommon
return static_cast<T &>(*this);
}

// キックをOFFにせずにドリブルパワーを設定する
T & withDribble(double power)
{
command->latest_msg.dribble_power = power;
return static_cast<T &>(*this);
}

T & setTargetTheta(double theta)
{
command->latest_msg.target_theta = theta;
Expand Down

0 comments on commit fe6da63

Please sign in to comment.