Skip to content

Commit 781b237

Browse files
committed
RVO2Plannerでのプロファイルの値を出力
1 parent bd0e56b commit 781b237

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

crane_local_planner/include/crane_local_planner/rvo2_planner.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class RVO2Planner : public LocalPlannerBase
2626
public:
2727
explicit RVO2Planner(rclcpp::Node & node);
2828

29-
void reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & msg);
29+
void reflectWorldToRVOSim(crane_msgs::msg::RobotCommands & msg);
3030

3131
crane_msgs::msg::RobotCommands extractRobotCommandsFromRVOSim(
3232
const crane_msgs::msg::RobotCommands & msg);

crane_local_planner/src/rvo2_planner.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ RVO2Planner::RVO2Planner(rclcpp::Node & node)
5555
[this](const crane_msgs::msg::RobotFeedbackArray & msg) { latest_feedback = msg; });
5656
}
5757

58-
void RVO2Planner::reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & msg)
58+
void RVO2Planner::reflectWorldToRVOSim(crane_msgs::msg::RobotCommands & msg)
5959
{
6060
if (
6161
world_model->getMsg().play_situation.command_raw.value ==
@@ -151,6 +151,9 @@ void RVO2Planner::reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & ms
151151
max_vel = std::min(max_vel, 1.0);
152152
}
153153

154+
command.local_planner_config.final_planned_max_acceleration = acceleration;
155+
command.local_planner_config.final_planned_max_velocity = max_vel;
156+
154157
target_vel = target_vel.normalized() * max_vel;
155158

156159
if (target_vel.norm() < command.local_planner_config.terminal_velocity) {

crane_msgs/msg/control/LocalPlannerConfig.msg

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ float32 terminal_velocity 0
1010
uint8 priority 0
1111

1212
float32 theta_tolerance 0.0
13+
14+
float32 final_planned_max_acceleration -1.0
15+
float32 final_planned_max_velocity -1.0

0 commit comments

Comments
 (0)