Skip to content

Commit 9a65c38

Browse files
Smac/Hybrid-A* planner (ros-navigation#2021)
* adding smac_planner to navigation2 metapackage * adding params to metapackage * update config files * adding navfn benchmark testing * updates to costmap_2d for flexility * update planner API for new changes * adding ompl to underlay because ros2 master doesn't contain the rosdep key * patching templated footprint collision checker * fix typo * updating readme config file * Analytic expansion (ros-navigation#43) * Use OMPL to generate heuristics The calculation is run at every planning cycle. It does not seem to slow down the planner - the calculation time seems to be quick enough that the improvement in graph expansion accounts for it. * Use OMPL to calculate analytic solution when near goal * Make angles multiples of the bin size to stop looping behaviour * Uncrustify * Use faster std::sqrt function * Fix analytic path so that the collision checker has coordinates to check! * Pre-allocate variables in analytic path expansion * Rename typedef to NodeGetter to more accurately describe function * Use distance rather than heuristic to determine when to perform analytic expansion Also force the analytic expansion to run on first iteration in case path is trivial. * Move the check for motion model into the main A* loop * Add copyright notices * Remove comment about relaxing node match tolerances The analytic expansion removes the need for this. * Correctly reset node coordinates when aborting from analytic expansion * Move analytic expansion logic to separate function * Uncrustify * Remove unneeded call to get goal coordinates * Fix the calculation of intervals in the analytic path Reserve the number of candidate nodes we are expecting. Base calculations on intervals rather than points - makes distances between nodes work properly. * Rescale heuristic so that analytic expansions are based on distance * Repeatedly split analytic path in half when checking for collision * Add parameter to control rate of analytic expansion attempts * Uncrustify * Fix incorrect type in templated function * Cpplint * Revert "Repeatedly split analytic path in half when checking for collision" This reverts commit 94d9ee0. There was a marginal speed gain (perhaps!) and the splitting approach made the code harder to understand and maintain. * Uncrustify * Add doxygen comments * Add parameter description for analytic expansion ratio * Set lower limit of 2 on number of iterations between analytic expansions * Reduce expected number of iterations because of analytic completion * Refactor analytic expansion ratio calcs to make logic easier to understand * add readme color * fix linting * ceil from floor (and speed up) * a few updates * fix smac tests * fixing smoother test * remove cost check - to be readded at another time * working last test from debug issues * Update README.md * Update README.md * adding getUseRadius API doxygen Co-authored-by: James Ward <[email protected]>
1 parent 00b9482 commit 9a65c38

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

nav2_bringup/bringup/params/nav2_multirobot_params_1.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ local_costmap:
161161
inflation_layer:
162162
plugin: "nav2_costmap_2d::InflationLayer"
163163
cost_scaling_factor: 3.0
164+
inflation_radius: 0.55
164165
obstacle_layer:
165166
plugin: "nav2_costmap_2d::ObstacleLayer"
166167
enabled: True

nav2_bringup/bringup/params/nav2_multirobot_params_2.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ local_costmap:
161161
inflation_layer:
162162
plugin: "nav2_costmap_2d::InflationLayer"
163163
cost_scaling_factor: 3.0
164+
inflation_radius: 0.55
164165
obstacle_layer:
165166
plugin: "nav2_costmap_2d::ObstacleLayer"
166167
enabled: True

nav2_bringup/bringup/params/nav2_params.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ local_costmap:
168168
inflation_layer:
169169
plugin: "nav2_costmap_2d::InflationLayer"
170170
cost_scaling_factor: 3.0
171+
inflation_radius: 0.55
171172
voxel_layer:
172173
plugin: "nav2_costmap_2d::VoxelLayer"
173174
enabled: True
@@ -204,6 +205,7 @@ global_costmap:
204205
use_sim_time: True
205206
robot_radius: 0.22
206207
resolution: 0.05
208+
track_unknown_space: true
207209
plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
208210
obstacle_layer:
209211
plugin: "nav2_costmap_2d::ObstacleLayer"
@@ -220,6 +222,8 @@ global_costmap:
220222
map_subscribe_transient_local: True
221223
inflation_layer:
222224
plugin: "nav2_costmap_2d::InflationLayer"
225+
cost_scaling_factor: 3.0
226+
inflation_radius: 0.55
223227
always_send_full_costmap: True
224228
global_costmap_client:
225229
ros__parameters:

nav2_bringup/bringup/rviz/nav2_default_view.rviz

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,20 @@ Visualization Manager:
249249
Value: /global_costmap/costmap
250250
Use Timestamp: false
251251
Value: true
252+
- Alpha: 0.3
253+
Class: rviz_default_plugins/Map
254+
Color Scheme: costmap
255+
Draw Behind: false
256+
Enabled: true
257+
Name: Downsampled Costmap
258+
Topic:
259+
Depth: 1
260+
Durability Policy: Transient Local
261+
History Policy: Keep Last
262+
Reliability Policy: Reliable
263+
Value: /downsampled_costmap
264+
Use Timestamp: false
265+
Value: true
252266
- Alpha: 1
253267
Buffer Length: 1
254268
Class: rviz_default_plugins/Path

0 commit comments

Comments
 (0)