-
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_3d: add an option to trigger planning by costmap updates #727
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## master #727 +/- ##
==========================================
- Coverage 88.92% 88.66% -0.26%
==========================================
Files 62 62
Lines 4596 4615 +19
==========================================
+ Hits 4087 4092 +5
- Misses 509 523 +14
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -191,6 +193,46 @@ class DynamicParameterChangeTest | |||
pub_map_overlay_.publish(map_overlay_); | |||
} | |||
|
|||
double getAveragePathInterval(const ros::Duration costmap_publishing_interval) |
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.
double getAveragePathInterval(const ros::Duration costmap_publishing_interval) | |
double getAveragePathInterval(const ros::Duration &costmap_publishing_interval) |
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
planner_cspace/src/planner_3d.cpp
Outdated
@@ -721,12 +723,8 @@ class Planner3dNode | |||
previous_path_ = path; | |||
} | |||
|
|||
void cbMapUpdate(const costmap_cspace_msgs::CSpace3DUpdate::ConstPtr msg) | |||
void applyCostmapUpdate(const costmap_cspace_msgs::CSpace3DUpdate::ConstPtr msg) |
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.
void applyCostmapUpdate(const costmap_cspace_msgs::CSpace3DUpdate::ConstPtr msg) | |
void applyCostmapUpdate(const costmap_cspace_msgs::CSpace3DUpdate::ConstPtr &msg) |
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
planner_cspace/src/planner_3d.cpp
Outdated
no_map_update_timer_ = | ||
nh_.createTimer(costmap_watchdog_, &Planner3dNode::cbNoMapUpdateTimer, this, true); | ||
} | ||
void cbMapUpdate(const costmap_cspace_msgs::CSpace3DUpdate::ConstPtr msg) |
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.
void cbMapUpdate(const costmap_cspace_msgs::CSpace3DUpdate::ConstPtr msg) | |
void cbMapUpdate(const costmap_cspace_msgs::CSpace3DUpdate::ConstPtr &msg) |
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
planner_cspace/src/planner_3d.cpp
Outdated
updateStart(); | ||
if (jump_.detectJump()) | ||
{ | ||
bbf_costmap_.clear(); | ||
// Robot pose jumped. | ||
} |
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 jump detector has constant threshold, effective jump detection threshold differs if costmap update interval is not constant.
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.
Moved in spin()
. It will be called at 100hz.
… add-plan-after-costmap-received
This comment has been minimized.
This comment has been minimized.
@@ -826,6 +823,7 @@ class Planner3dNode | |||
} | |||
} | |||
} | |||
map_update_retained_ = nullptr; |
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.
This change is needed because msg
is changed to a reference. map_update_retained_
can be the same as msg
, so map_update_retained_
should be kept until msg
is processed.
[540] PASSED on noeticAll tests passed
|
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
When
trigger_plan_by_costmap_update
option is true,planner_3d
makes a new path soon after CSpace3DUpdate message is subscribed.With this option, the updates of the costmap are reflected in path planning quickly.