File tree Expand file tree Collapse file tree 5 files changed +9
-6
lines changed
nav2_controller/include/nav2_controller Expand file tree Collapse file tree 5 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,6 @@ class ControllerServer : public nav2::LifecycleNode
233
233
// Dynamic parameters handler
234
234
rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr dyn_params_handler_;
235
235
std::mutex dynamic_params_lock_;
236
- std::mutex path_mutex_;
237
236
238
237
// The controller needs a costmap node
239
238
std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros_;
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ float32 tracking_error
5
5
uint32 last_index
6
6
float32 cross_product
7
7
geometry_msgs/PoseStamped robot_pose
8
- float32 distance_to_goal
8
+ float32 distance_to_goal
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ inline double cross_product_2d(
254
254
const double robot_vec_x = p.x - a.x ;
255
255
const double robot_vec_y = p.y - a.y ;
256
256
257
- return (path_vec_x * robot_vec_y) - (path_vec_y * robot_vec_x);
257
+ return (path_vec_x * robot_vec_y) - (path_vec_y * robot_vec_x);
258
258
}
259
259
260
260
} // namespace geometry_utils
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ PathSearchResult distance_from_path(
43
43
return result;
44
44
}
45
45
46
- if (start_index >= path.poses .size ()) {
46
+ if (start_index >= path.poses .size () - 1 ) {
47
47
throw std::invalid_argument (
48
48
" Invalid operation: requested start index (" + std::to_string (start_index) +
49
49
" ) is greater than or equal to path size (" + std::to_string (path.poses .size ()) +
Original file line number Diff line number Diff line change @@ -177,8 +177,12 @@ class RetracingPathTest : public ::testing::Test
177
177
protected:
178
178
void SetUp () override
179
179
{
180
- for (int i = 0 ; i <= 10 ; ++i) {target_path.poses .push_back (createPoseStamped (i, 0.0 ));}
181
- for (int i = 9 ; i >= 0 ; --i) {target_path.poses .push_back (createPoseStamped (i, 0.0 ));}
180
+ for (int i = 0 ; i <= 10 ; ++i) {
181
+ target_path.poses .push_back (createPoseStamped (i, 0.0 ));
182
+ }
183
+ for (int i = 9 ; i >= 0 ; --i) {
184
+ target_path.poses .push_back (createPoseStamped (i, 0.0 ));
185
+ }
182
186
for (int i = 0 ; i <= 10 ; ++i) {
183
187
robot_trajectory.push_back (createPose (i, 0.5 ));
184
188
}
You can’t perform that action at this time.
0 commit comments