Skip to content

Commit

Permalink
RVO2Plannerでのプロファイルの値を出力
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo committed Mar 8, 2025
1 parent bd0e56b commit 781b237
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RVO2Planner : public LocalPlannerBase
public:
explicit RVO2Planner(rclcpp::Node & node);

void reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & msg);
void reflectWorldToRVOSim(crane_msgs::msg::RobotCommands & msg);

crane_msgs::msg::RobotCommands extractRobotCommandsFromRVOSim(
const crane_msgs::msg::RobotCommands & msg);
Expand Down
5 changes: 4 additions & 1 deletion crane_local_planner/src/rvo2_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RVO2Planner::RVO2Planner(rclcpp::Node & node)
[this](const crane_msgs::msg::RobotFeedbackArray & msg) { latest_feedback = msg; });
}

void RVO2Planner::reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & msg)
void RVO2Planner::reflectWorldToRVOSim(crane_msgs::msg::RobotCommands & msg)
{
if (
world_model->getMsg().play_situation.command_raw.value ==
Expand Down Expand Up @@ -151,6 +151,9 @@ void RVO2Planner::reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & ms
max_vel = std::min(max_vel, 1.0);
}

command.local_planner_config.final_planned_max_acceleration = acceleration;
command.local_planner_config.final_planned_max_velocity = max_vel;

target_vel = target_vel.normalized() * max_vel;

if (target_vel.norm() < command.local_planner_config.terminal_velocity) {
Expand Down
3 changes: 3 additions & 0 deletions crane_msgs/msg/control/LocalPlannerConfig.msg
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ float32 terminal_velocity 0
uint8 priority 0

float32 theta_tolerance 0.0

float32 final_planned_max_acceleration -1.0
float32 final_planned_max_velocity -1.0

0 comments on commit 781b237

Please sign in to comment.