Skip to content
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

Fix max path cycles for case where map has larger Y dimension than X dimension #2017

Merged
merged 3 commits into from
Oct 6, 2020
Merged

Fix max path cycles for case where map has larger Y dimension than X dimension #2017

merged 3 commits into from
Oct 6, 2020

Conversation

justinIRBT
Copy link
Contributor


Basic Info

Info Please fill out this column
Ticket(s) this addresses #2016
Primary OS tested on (Raspbian Buster)
Robotic platform tested on (Raspberry Pi 4 + RPLIDAR A1 + Roomba)

Description of contribution in a few bullet points

My test environment is much larger in length than width, I was frequently getting failed path plans when issuing commands that traversed the length of the environment. I noticed the max cycles to run NavFn::calcPath is derived from the X dimension alone, I changed it to be depending on whether the X or Y dimension is larger.

Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can merge with a little clean up. Just make a const int & variable in the line before this and use it when calling calcPath.

nav2_navfn_planner/src/navfn_planner.cpp Outdated Show resolved Hide resolved
@SteveMacenski
Copy link
Member

Also FYI: the new smac planner 2D will not have that problem https://github.com/SteveMacenski/navigation2/tree/nav2_smac_planner/smac_planner/src. Its on my agenda to submit a PR to nav2 this week. The package's readme has more context.

@codecov
Copy link

codecov bot commented Oct 6, 2020

Codecov Report

Merging #2017 into main will decrease coverage by 0.31%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2017      +/-   ##
==========================================
- Coverage   84.59%   84.27%   -0.32%     
==========================================
  Files         294      294              
  Lines       15056    15058       +2     
==========================================
- Hits        12736    12690      -46     
- Misses       2320     2368      +48     
Flag Coverage Δ
#project 84.27% <100.00%> (-0.32%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nav2_navfn_planner/src/navfn_planner.cpp 93.41% <100.00%> (+0.07%) ⬆️
nav2_recoveries/plugins/wait.cpp 0.00% <0.00%> (-100.00%) ⬇️
nav2_util/include/nav2_util/costmap.hpp 0.00% <0.00%> (-100.00%) ⬇️
...vior_tree/test/plugins/action/test_spin_action.cpp 0.00% <0.00%> (-100.00%) ⬇️
...av2_dwb_controller/dwb_critics/src/oscillation.cpp 68.67% <0.00%> (-19.28%) ⬇️
...av2_costmap_2d/src/footprint_collision_checker.cpp 88.37% <0.00%> (-2.33%) ⬇️
nav2_bt_navigator/src/bt_navigator.cpp 94.07% <0.00%> (+1.31%) ⬆️
nav2_controller/src/nav2_controller.cpp 89.23% <0.00%> (+1.79%) ⬆️
...lifecycle_manager/src/lifecycle_manager_client.cpp 88.09% <0.00%> (+2.38%) ⬆️
nav2_recoveries/plugins/spin.cpp 93.33% <0.00%> (+5.33%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63aa0ad...932d278. Read the comment docs.

@SteveMacenski
Copy link
Member

Thanks for the patch!

@SteveMacenski SteveMacenski merged commit dcc1d4d into ros-navigation:main Oct 6, 2020
@justinIRBT justinIRBT deleted the fix-path-max-len-small_x branch October 6, 2020 19:05
SteveMacenski pushed a commit that referenced this pull request Nov 4, 2020
…dimension (#2017)

* Fix max path cycles for case where map has larger Y dimension than X dimension

* Improve readability

* fix ament_cpplint and ament_uncrustify issues
SteveMacenski added a commit that referenced this pull request Nov 4, 2020
* initialize variables in inflation layer (#1970)

* Fix zero waypoints crash (#1978)

* return if the number of waypoints is zero.

* terminate the action.

* Succeed action instead of terminating.

* Add IsBatteryLow condition node (#1974)

* Add IsBatteryLow condition node

* Update default battery topic and switch to battery %

* Fix test

* Switch to sensor_msgs/BatteryState

* Add option to use voltage by default or switch to percentage

* Add sensor_msgs dependency in package.xml

* Make percentage default over voltage

* Update parameter list

* Initialize inflate_cone_ variable. (#1988)

* Initialize inflate_cone_ variable.

* initialize inflate_cone_ based on parameter.

* Increase the sleep time in the tests makes the costmap test always succeed on my machine.

* Add timeouts to all spin_until_future_complete calls (#1998)

* Add timeouts to all spin_until_future_complete calls

Signed-off-by: Sarthak Mittal <sarthakmittal2608@gmail.com>

* Update default timeout value

Signed-off-by: Sarthak Mittal <sarthakmittal2608@gmail.com>

* Controllers should not be influenced by time jumps or slew (#2012)

* Controllers should not be influenced by time jumps

Therefore use rclcpp::GenericRate<std::chrono::steady_clock> instead of
rclcpp::Rate

Signed-off-by: Martijn Buijs <martijn.buijs@gmail.com>

* Change to using `rclcpp::WallRate` for better readability

Signed-off-by: Martijn Buijs <martijn.buijs@gmail.com>

* Fix max path cycles for case where map has larger Y dimension than X dimension (#2017)

* Fix max path cycles for case where map has larger Y dimension than X dimension

* Improve readability

* fix ament_cpplint and ament_uncrustify issues

* fix minor cherry pick conflict mistake

* bump version to 0.4.4

Co-authored-by: Michael Ferguson <mfergs7@gmail.com>
Co-authored-by: Wilco Bonestroo <w.j.bonestroo@saxion.nl>
Co-authored-by: Sarthak Mittal <sarthakmittal2608@gmail.com>
Co-authored-by: Martijn Buijs <Martijn.buijs@gmail.com>
Co-authored-by: justinIRBT <69175069+justinIRBT@users.noreply.github.com>
ruffsl pushed a commit to ruffsl/navigation2 that referenced this pull request Jul 2, 2021
…dimension (ros-navigation#2017)

* Fix max path cycles for case where map has larger Y dimension than X dimension

* Improve readability

* fix ament_cpplint and ament_uncrustify issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants