From 44b268098f4c3f1388d41a2b30cea270881b62aa Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Sun, 13 Oct 2024 01:18:18 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=95=E3=82=88=E3=81=86=E3=81=AA=E3=82=89?= =?UTF-8?q?=E3=80=81max=5Fomega=20(#602)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crane_msgs/msg/control/LocalPlannerConfig.msg | 1 - .../robot_command_as_skill.hpp | 1 - .../src/robot_command_as_skill.cpp | 18 ------------------ crane_sender/src/ibis_sender_node.cpp | 2 +- crane_sender/src/ibis_velocity_sender_node.cpp | 2 +- crane_simple_ai/src/crane_commander.cpp | 1 - .../robot_command_wrapper.hpp | 6 ------ 7 files changed, 2 insertions(+), 29 deletions(-) diff --git a/crane_msgs/msg/control/LocalPlannerConfig.msg b/crane_msgs/msg/control/LocalPlannerConfig.msg index 283c35dbf..c4e58c216 100644 --- a/crane_msgs/msg/control/LocalPlannerConfig.msg +++ b/crane_msgs/msg/control/LocalPlannerConfig.msg @@ -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 diff --git a/crane_robot_skills/include/crane_robot_skills/robot_command_as_skill.hpp b/crane_robot_skills/include/crane_robot_skills/robot_command_as_skill.hpp index 2a69e0177..bad2f57f9 100644 --- a/crane_robot_skills/include/crane_robot_skills/robot_command_as_skill.hpp +++ b/crane_robot_skills/include/crane_robot_skills/robot_command_as_skill.hpp @@ -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); diff --git a/crane_robot_skills/src/robot_command_as_skill.cpp b/crane_robot_skills/src/robot_command_as_skill.cpp index 2aef759d3..52d3fd552 100644 --- a/crane_robot_skills/src/robot_command_as_skill.cpp +++ b/crane_robot_skills/src/robot_command_as_skill.cpp @@ -241,24 +241,6 @@ void CmdSetMaxAcceleration::print(std::ostream & os) const os << "[CmdSetMaxAcceleration] max_acceleration: " << getParameter("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("max_omega")); - return Status::SUCCESS; -} - -void CmdSetMaxOmega::print(std::ostream & os) const -{ - os << "[CmdSetMaxOmega] max_omega: " << getParameter("max_omega"); -} - CmdSetTerminalVelocity::CmdSetTerminalVelocity(RobotCommandWrapperBase::SharedPtr & base) : SkillBase("CmdSetTerminalVelocity", base) { diff --git a/crane_sender/src/ibis_sender_node.cpp b/crane_sender/src/ibis_sender_node.cpp index dbab3393a..aa11e6a33 100644 --- a/crane_sender/src/ibis_sender_node.cpp +++ b/crane_sender/src/ibis_sender_node.cpp @@ -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; diff --git a/crane_sender/src/ibis_velocity_sender_node.cpp b/crane_sender/src/ibis_velocity_sender_node.cpp index 68343efc8..ffc52fc05 100644 --- a/crane_sender/src/ibis_velocity_sender_node.cpp +++ b/crane_sender/src/ibis_velocity_sender_node.cpp @@ -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; diff --git a/crane_simple_ai/src/crane_commander.cpp b/crane_simple_ai/src/crane_commander.cpp index 173f2b9bc..207cc1c1c 100644 --- a/crane_simple_ai/src/crane_commander.cpp +++ b/crane_simple_ai/src/crane_commander.cpp @@ -63,7 +63,6 @@ CraneCommander::CraneCommander(QWidget * parent) : QMainWindow(parent), ui(new U setUpSkillDictionary(); setUpSkillDictionary(); // setUpSkillDictionary(); - // setUpSkillDictionary(); // setUpSkillDictionary(); setUpSkillDictionary(); setUpSkillDictionary(); diff --git a/utility/crane_msg_wrappers/include/crane_msg_wrappers/robot_command_wrapper.hpp b/utility/crane_msg_wrappers/include/crane_msg_wrappers/robot_command_wrapper.hpp index 249f870b3..1f0250220 100644 --- a/utility/crane_msg_wrappers/include/crane_msg_wrappers/robot_command_wrapper.hpp +++ b/utility/crane_msg_wrappers/include/crane_msg_wrappers/robot_command_wrapper.hpp @@ -214,12 +214,6 @@ class RobotCommandWrapperCommon return static_cast(*this); } - T & setMaxOmega(double max_omega) - { - command->latest_msg.local_planner_config.max_omega = max_omega; - return static_cast(*this); - } - T & setOmegaLimit(double omega_limit) { command->latest_msg.omega_limit = omega_limit;