Skip to content

Commit

Permalink
さようなら、max_omega (#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo authored Oct 12, 2024
1 parent 3ee36e2 commit 44b2680
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 29 deletions.
1 change: 0 additions & 1 deletion crane_msgs/msg/control/LocalPlannerConfig.msg
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ bool disable_rule_area_avoidance false

float32 max_acceleration 4.0
float32 max_velocity 6.0
float32 max_omega 1.0
float32 terminal_velocity 0
uint8 priority 0
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ DEFINE_SKILL_COMMAND(EnableBallCenteringControl, Position);
DEFINE_SKILL_COMMAND(EnableLocalGoalie, Position);
DEFINE_SKILL_COMMAND(SetMaxVelocity, Position);
DEFINE_SKILL_COMMAND(SetMaxAcceleration, Position);
DEFINE_SKILL_COMMAND(SetMaxOmega, Position);
DEFINE_SKILL_COMMAND(SetTerminalVelocity, Position);
DEFINE_SKILL_COMMAND(EnableStopFlag, Position);
DEFINE_SKILL_COMMAND(DisableStopFlag, Position);
Expand Down
18 changes: 0 additions & 18 deletions crane_robot_skills/src/robot_command_as_skill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,24 +241,6 @@ void CmdSetMaxAcceleration::print(std::ostream & os) const
os << "[CmdSetMaxAcceleration] max_acceleration: " << getParameter<double>("max_acceleration");
}

CmdSetMaxOmega::CmdSetMaxOmega(RobotCommandWrapperBase::SharedPtr & base)
: SkillBase("CmdSetMaxOmega", base)
{
setParameter("max_omega", 0.5);
}

Status CmdSetMaxOmega::update(
[[maybe_unused]] const ConsaiVisualizerWrapper::SharedPtr & visualizer)
{
command.setMaxOmega(getParameter<double>("max_omega"));
return Status::SUCCESS;
}

void CmdSetMaxOmega::print(std::ostream & os) const
{
os << "[CmdSetMaxOmega] max_omega: " << getParameter<double>("max_omega");
}

CmdSetTerminalVelocity::CmdSetTerminalVelocity(RobotCommandWrapperBase::SharedPtr & base)
: SkillBase("CmdSetTerminalVelocity", base)
{
Expand Down
2 changes: 1 addition & 1 deletion crane_sender/src/ibis_sender_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class IbisSenderNode : public SenderBase
packet.stop_emergency = command.stop_flag;
packet.acceleration_limit = command.local_planner_config.max_acceleration;
packet.linear_velocity_limit = command.local_planner_config.max_velocity;
packet.angular_velocity_limit = command.local_planner_config.max_omega;
packet.angular_velocity_limit = command.omega_limit;
packet.prioritize_move = true;
packet.prioritize_accurate_acceleration = true;

Expand Down
2 changes: 1 addition & 1 deletion crane_sender/src/ibis_velocity_sender_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class IbisSenderNode : public SenderBase
packet.stop_emergency = command.stop_flag;
packet.acceleration_limit = command.local_planner_config.max_acceleration;
packet.linear_velocity_limit = command.local_planner_config.max_velocity;
packet.angular_velocity_limit = command.local_planner_config.max_omega;
packet.angular_velocity_limit = command.omega_limit;
packet.prioritize_move = true;
packet.prioritize_accurate_acceleration = true;

Expand Down
1 change: 0 additions & 1 deletion crane_simple_ai/src/crane_commander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ CraneCommander::CraneCommander(QWidget * parent) : QMainWindow(parent), ui(new U
setUpSkillDictionary<skills::CmdSetMaxVelocity>();
setUpSkillDictionary<skills::Attacker>();
// setUpSkillDictionary<skills::CmdSetMaxAcceleration>();
// setUpSkillDictionary<skills::CmdSetMaxOmega>();
// setUpSkillDictionary<skills::CmdSetTerminalVelocity>();
setUpSkillDictionary<skills::CmdEnableStopFlag>();
setUpSkillDictionary<skills::CmdDisableStopFlag>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,6 @@ class RobotCommandWrapperCommon
return static_cast<T &>(*this);
}

T & setMaxOmega(double max_omega)
{
command->latest_msg.local_planner_config.max_omega = max_omega;
return static_cast<T &>(*this);
}

T & setOmegaLimit(double omega_limit)
{
command->latest_msg.omega_limit = omega_limit;
Expand Down

0 comments on commit 44b2680

Please sign in to comment.