File tree 3 files changed +9
-3
lines changed
include/crane_local_planner
3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class RVO2Planner : public LocalPlannerBase
26
26
public:
27
27
explicit RVO2Planner (rclcpp::Node & node);
28
28
29
- void reflectWorldToRVOSim (const crane_msgs::msg::RobotCommands & msg);
29
+ void reflectWorldToRVOSim (crane_msgs::msg::RobotCommands & msg);
30
30
31
31
crane_msgs::msg::RobotCommands extractRobotCommandsFromRVOSim (
32
32
const crane_msgs::msg::RobotCommands & msg);
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ RVO2Planner::RVO2Planner(rclcpp::Node & node)
55
55
[this ](const crane_msgs::msg::RobotFeedbackArray & msg) { latest_feedback = msg; });
56
56
}
57
57
58
- void RVO2Planner::reflectWorldToRVOSim (const crane_msgs::msg::RobotCommands & msg)
58
+ void RVO2Planner::reflectWorldToRVOSim (crane_msgs::msg::RobotCommands & msg)
59
59
{
60
60
if (
61
61
world_model->getMsg ().play_situation .command_raw .value ==
@@ -70,7 +70,7 @@ void RVO2Planner::reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & ms
70
70
}
71
71
}
72
72
// 味方ロボット:RVO内の位置・速度(=進みたい方向)の更新
73
- for (const auto & command : msg.robot_commands ) {
73
+ for (auto & command : msg.robot_commands ) {
74
74
rvo_sim->setAgentPosition (
75
75
command.robot_id , RVO::Vector2 (command.current_pose .x , command.current_pose .y ));
76
76
rvo_sim->setAgentPrefVelocity (command.robot_id , RVO::Vector2 (0 .f , 0 .f ));
@@ -151,6 +151,9 @@ void RVO2Planner::reflectWorldToRVOSim(const crane_msgs::msg::RobotCommands & ms
151
151
max_vel = std::min (max_vel, 1.0 );
152
152
}
153
153
154
+ command.local_planner_config .final_planned_max_acceleration = acceleration;
155
+ command.local_planner_config .final_planned_max_velocity = max_vel;
156
+
154
157
target_vel = target_vel.normalized () * max_vel;
155
158
156
159
if (target_vel.norm () < command.local_planner_config .terminal_velocity ) {
Original file line number Diff line number Diff line change @@ -10,3 +10,6 @@ float32 terminal_velocity 0
10
10
uint8 priority 0
11
11
12
12
float32 theta_tolerance 0.0
13
+
14
+ float32 final_planned_max_acceleration -1.0
15
+ float32 final_planned_max_velocity -1.0
You can’t perform that action at this time.
0 commit comments