-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
planner_cspace: start planning from expected robot pose #717
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c90fe61
to
2f8109e
Compare
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## master #717 +/- ##
==========================================
+ Coverage 88.34% 88.41% +0.06%
==========================================
Files 60 62 +2
Lines 4444 4582 +138
==========================================
+ Hits 3926 4051 +125
- Misses 518 531 +13
|
This comment has been minimized.
This comment has been minimized.
c5e0a1e
to
6f21090
Compare
This comment has been minimized.
This comment has been minimized.
… add-start-pose-predictor
This comment has been minimized.
This comment has been minimized.
… add-start-pose-predictor
This comment has been minimized.
This comment has been minimized.
range_limit, | ||
1.0f / freq_min_, | ||
find_best_)) | ||
bool is_goal_same_as_start = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems always be false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, and I added a test to cover this logic.
paths_["switch_back"] = std::make_pair(path_grid_switch_back, getMetricPath(path_grid_switch_back)); | ||
} | ||
|
||
nav_msgs::Path getMetricPath(const std::list<GridAstar<3, 2>::Vec>& path_grid) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like convert
rather than get
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pose.pose.orientation.z = sin(yaw / 2); | ||
pose.pose.orientation.w = cos(yaw / 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pose.pose.orientation.z = sin(yaw / 2); | |
pose.pose.orientation.w = cos(yaw / 2); | |
pose.pose.orientation.z = std::sin(yaw / 2); | |
pose.pose.orientation.w = std::cos(yaw / 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
EXPECT_EQ(start_grid[0], 5); | ||
EXPECT_EQ(start_grid[1], 6); | ||
EXPECT_EQ(start_grid[2], 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As there's ==
operator, I think it can be
EXPECT_EQ(start_grid[0], 5); | |
EXPECT_EQ(start_grid[1], 6); | |
EXPECT_EQ(start_grid[2], 1); | |
EXPECT_EQ(StartPosePredictor::Astar::Vec(5, 6, 1), start_grid); |
neonavigation/planner_cspace/include/planner_cspace/cyclic_vec.h
Lines 163 to 170 in fdfea8e
template <typename T2> | |
bool operator==(const CyclicVecBase<DIM, NONCYCLIC, T2>& v) const | |
{ | |
for (int i = 0; i < DIM; i++) | |
if (v.e_[i] != e_[i]) | |
return false; | |
return true; | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
planner_cspace/src/planner_3d.cpp
Outdated
const std::list<Astar::Vecf> path_interpolated = | ||
model_->path_interpolator_.interpolate(path_grid, 0.5, local_range_); | ||
path.poses = start_pose_predictor_.getPreservedPath().poses; | ||
grid_metric_converter::grid2MetricPath(map_info_, path_interpolated, path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally didn't expect to use grid2MetricPath
to append poses to existing path and it looks confusing.
It would be better to rename it to something like grid2MetricPathAppended
/grid2MetricPathWithAppend
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to appendGridPath2MetricPath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[517] PASSED on noeticAll tests passed
|
This PR adds
keep_a_part_of_previous_path
option. As described in the diagram above, this option is useful when the robot's speed is high or the environment is dynamic.In addition, the algorithm to preserve paths including switchback points is integrated. When it is expected the robot reaches a switchback point within
sw_wait
seconds, the path until the switchback point is preserved and the new path planning starts from the switchback point.