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

Deadlock when a static layer gets map updated #3109

Closed
daisukes opened this issue Aug 12, 2022 · 5 comments · Fixed by #3145
Closed

Deadlock when a static layer gets map updated #3109

daisukes opened this issue Aug 12, 2022 · 5 comments · Fixed by #3145

Comments

@daisukes
Copy link
Contributor

I found a deadlock bug when I tested our new prototype, which frequently updates the static costmap.

Bug report

Required Info:

  • Operating System:
    • Ubuntu20.04
  • ROS2 Version:
    • Galactic (ros:galactic docker image)
  • Version or commit hash:
    • Galactic sync 2-based (a25cd43) custom build
  • DDS implementation:
    • default (cyclone dds)

Steps to reproduce issue

  • frequently update the static costmap (2hz)

Expected behavior

  • no deadlock

Actual behavior

Additional information

Implementation considerations

The mutex of the static layer should be unlocked before calling resizeMap of the layered costmap
https://github.com/ros-planning/navigation2/blob/6a9508b772eb6f07cbfd350b3578aa9de2567d59/nav2_costmap_2d/plugins/static_layer.cpp#L194-L198

I think this lock can be removed. What do you think?
https://github.com/ros-planning/navigation2/blob/6a9508b772eb6f07cbfd350b3578aa9de2567d59/nav2_costmap_2d/plugins/static_layer.cpp#L272

@SteveMacenski
Copy link
Member

SteveMacenski commented Aug 19, 2022

@daisukes thanks for filing, back from PTO now and took a look at this.

Basically the issue to solve is how to unlock the updateBounds/incomingMap locks within processMap for layered costmap resize. I thought about how to remove the locks from those functions but I don't think it works out because we need to still protect map_buffer_. Maybe the solution is to have a class member lock object that we're locking / unlocking so we can access it in multiple scopes. Or even just rewriting the update semantics, this atomic / multiple location of updates stuff with the buffer mid-update is really quite convoluted. It might be better to have a class member guard using the mutex that is locked at the start of updateBounds and unlocked at the end of updateCosts and similarly with incomingMap / incomingUpdate to just block the threads and have the map changes only occur within the incomingXYZ functions and remove this map_buffer_ stuff (or vise versa: only ever buffer the map in the incomingXYZ and process in the updateBounds method. That might actaully be better not to block the the subscriber thread when a map is coming in that could block sensor data).

However, I don't think just removing https://github.com/ros-planning/navigation2/blob/6a9508b772eb6f07cbfd350b3578aa9de2567d59/nav2_costmap_2d/plugins/static_layer.cpp#L272 works, because that then exposes map_buffer_ outside of the mutex which both threads modify. There could be a situation where update_in_progress_ is set to true in updateBounds and while processMap(*map_buffer) is being called, map_buffer_ = new_map; is being set in incomingMap. Its unlikely to happen, but it can happen.

Thoughts?

@daisukes
Copy link
Contributor Author

Thank you for the comments.
How about this change? I made a test code that reproduces the deadlock, and this works fine with the test code.

  • I think it does not need to call mapProcess twice when map_received_ is false
  • map_buffer_ = nullptr is not needed when update_in_progress_ is false
  • isolate processMap from the lock_guard
void
StaticLayer::incomingMap(const nav_msgs::msg::OccupancyGrid::SharedPtr new_map)
{
  {
    std::lock_guard<Costmap2D::mutex_t> guard(*getMutex());
    if (!map_received_) {
      map_received_ = true;
    }

    if (update_in_progress_.load()) {
      map_buffer_ = new_map;
      return;
    }
  }
  processMap(*new_map);
}

original code
https://github.com/ros-planning/navigation2/blob/6a9508b772eb6f07cbfd350b3578aa9de2567d59/nav2_costmap_2d/plugins/static_layer.cpp#L269-L283

daisukes added a commit to CMU-cabot/navigation2 that referenced this issue Aug 20, 2022
- isolate processMap from static_layer's lock_guard scope

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
daisukes added a commit to CMU-cabot/navigation2 that referenced this issue Aug 20, 2022
- isolate processMap from static_layer's lock_guard scope

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
daisukes added a commit to CMU-cabot/navigation2 that referenced this issue Aug 21, 2022
- isolate processMap from static_layer's lock_guard scope

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
@SteveMacenski
Copy link
Member

SteveMacenski commented Aug 22, 2022

I think that would work if in updateBounds the check on map_received_ https://github.com/ros-planning/navigation2/blob/main/nav2_costmap_2d/plugins/static_layer.cpp#L340-L342 is put under the mutex in L334 that way if map_received_ is set to true but before processMap is called within incomingMap, we're still protected by the mutex.

Edit: Actually, I don't think that works since processMap from incomingMap could then be running at the same time as updateBounds -- which in the "bad" situation would have the bounds updated for the old map, then processMap is unblocked to set new values, and then updateCosts is run in the different map. In the worst case, the resizing could make some of those bounds invalid.

I think these semantics of having the map processed in both locations is really unnecessary and the cause of all of these problems. This was not the case in ROS 1 so I have no problem moving it elsewhere. In ROS 1, we did it in the map callbacks (which did not synchronize between updates on updateBounds/updateCosts). I think here instead we should do it at the start of updateBounds which then makes any changes to the map entirely sequential. So we should always buffer maps and never process in the map callbacks (except for maybe that very first map we receive just to get going).

We can keep incomingUpdate the same since it doesn't mess with the bounds and the setting of costmap_ values is under a lock that is shared with the updatebounds/costs, as calling that function should never actually impact the bounds to invalidate updateCosts bounds to consider. So really, its just removing the processing from incomingMap, moving it to always in updateBounds -- except for the very first map

daisukes added a commit to CMU-cabot/navigation2 that referenced this issue Aug 23, 2022
Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
daisukes added a commit to CMU-cabot/navigation2 that referenced this issue Aug 23, 2022
Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
daisukes added a commit to CMU-cabot/navigation2 that referenced this issue Aug 23, 2022
Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
@daisukes
Copy link
Contributor Author

I made a test code and a PR for the patch which changes the static map update location as you suggested.
One thing I am not sure if it is okay assuming the costmap update is frequent enough compared to map receiving.

@SteveMacenski
Copy link
Member

SteveMacenski commented Aug 23, 2022

For a new map, does it matter? If we have a map pending to be processed (which would completely overwrite the existing one) but a new one comes in to overwrite that -- does it matter if we didn't process the one in the middle if no costmap update was requested? I would think not.

For just localized updates, that would be a problem, but the incomingUpdate handles those semantics

@SteveMacenski SteveMacenski linked a pull request Aug 23, 2022 that will close this issue
7 tasks
SteveMacenski pushed a commit that referenced this issue Aug 31, 2022
* bugfix (#3109) deadlock when costmap receives new map

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* introduce map_received_in_update_bounds_ flag to make sure processMap will not be called between updateBounds and updateCosts

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
SteveMacenski pushed a commit that referenced this issue Nov 8, 2022
* bugfix (#3109) deadlock when costmap receives new map

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* introduce map_received_in_update_bounds_ flag to make sure processMap will not be called between updateBounds and updateCosts

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
SteveMacenski added a commit that referenced this issue Nov 8, 2022
* standalone assisted teleop (#2904)

* standalone assisted teleop

* added in action message

* code review

* moved to behavior server

* added assisted teleop bt node

* revert

* added bt node for assisted teleop

* lint fix

* added cancel assisted teleop node

* code review

* working

* cleanup

* updated feeback

* code review

* update compute velocity

* cleanup

* lint fixes

* cleanup

* test fix

* starting to add tests for assisted teleop

* fixed tests

* undo

* fixed test

* is_recovery

* adjust abort result based on recovery or not

* code review

* added preempt velocity

* working preempt assisted teleop test

* completed assisted teleop tests

* code review

* undo

* code review

* remove sleep

* topic rename

* missing comma

* added comma :(

* added comma

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Add the support of range sensors to Collision Monitor (#3099)

* Support range sensors in Collision Monitor

* Adjust README.md

* Meet review fixes

* Fix #3152: Costmap extend did not include Y component (#3153)

* missing nodes added to nav2_tree_nodes.xml (#3155)

* Change deprecated ceres function (#3158)

* Change deprecated function

* Update smoother_cost_function.hpp

* remove camera_rgb_joint since child frame does not exist (#3162)

* bugfix (#3109) deadlock when costmap receives new map (#3145)

* bugfix (#3109) deadlock when costmap receives new map

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* introduce map_received_in_update_bounds_ flag to make sure processMap will not be called between updateBounds and updateCosts

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* simple command costmap api - first few functions (#3159)

* initial commit costmap_2d template

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>

* finish task A and tested

* lint

* Update nav2_simple_commander/nav2_simple_commander/costmap_2d.py

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* fix trailing underscores

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>
Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Fix missing dependency on nav2_collision_monitor (#3175)

* fixed start (#3168)

* fixed start

* return true

* fix tests

* Fix velocities comparison for rotation at place case (#3177)

* Fix velocities comparison for rotation at place case

* Meet review item

* Remove unnecessary header

* Change the comment

* set a empty path on halt (#3178)

* set a empty path on halt

* fixed issues

* remove path reset

* fixing

* reverting

* revert

* revert

* fixed lint

* test fix

* uncrusify fix

* simple command costmap api - update few functions (#3169)

* * add aditional function to costmap_2d.py

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>

Updated-by: Jaehun Kim <k9632441@gmail.com>

* finish task B

* Update nav2_simple_commander/nav2_simple_commander/costmap_2d.py

* Update method docs

* Remove underscores at parameters and split getCost into getCostXY and getCostIdx

* Update method docstrings

* lint code & update docstring, remove default value of getCostXY

* lint code with pep257 & flake8

* clear names for bt nodes (#3183)

* [Smac] check if a node exists before creating (#3195)

* check if a node exists before creating

* invert logic to group like with like

* Update a_star.cpp

* fixing benchmarkign for planners (#3202)

* [Smac] Robin hood data structure improves performance by 10-15%! (#3201)

* adding robin_hood unordered_map

* using robin_hood node map

* ignore robin_hood file

* linting

* linting cont. for triple pointers

* linting cont. for uncrustify

* [RPP] Add parameter to enable/disable collision detection (#3204)

* [RPP] Add parameter to enable/disable collision detection

* [RPP] Update README

* Update waffle.model

* add benchmark launch file + instructions (#3218)

* removing hypotf from smac planner heuristic computation (#3217)

* removing hypotf

* swapping to node2d sqrt

* complete smac planner tolerances (#3219)

* Disable Output Buffering (#3220)

To ensure await asyncio prints [Processing: %s]' every 30s as expected

* fix majority of python linting errors introduced in python costmap API additions to get CI turning over again (#3223)

* fix majority of python linting errors

* finish linting

* Assisted teleop simple commander (#3198)

* add assisted teleop to python api

* cleanup

* assisted teleop demo

* rename

* lint

* code review

* trigger build

* flake8 fix

* break cashe

* moved all v11 to v12

* lint fix

* remove package dep

* change default time allowance

* Costmap Filter enabling service (#3229)

* Add enabling service to costmap filters

* Add service testcase

* Fix comment

* Use toggle_filter service name

* Add binary flip costmap filter (#3228)

* Add binary flip costmap filter

* Move transformPose, worldToMask, getMaskData to CostmapFilter

* Added default parametrized binary filter state

* Switched to std_msgs/msg/Bool.msg

* Use arbitrary filter values

* Update waffle.model

* Update waffle.model

* Update test_actions.cpp

* odom alpha restriction to avoid overflow caused by user-misconfiguration (#3238)

* odom alpha restriction

* odom alpha code style

* odom alpha code style

* odom alpha code style

* Update controller server goal checker (#3240)

* [FIX] Update controller server goal checker

* [FIX] Autoformat code

* [FIX] Misplaced tabs.

Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>

* map-size restriction to avoid overflow and nullptr caused by user-misconfiguration (#3242)

* odom alpha restriction

* odom alpha code style

* odom alpha code style

* odom alpha code style

* map-size restriction

* map-size code style

* map-size rejection

* map-size codestyle

* map-size return false

* Add Path Smoothers Benchmarking suite (#3236)

* Add Path Smoothers Benchmarking suite

* Meet review items

* Update tools/smoother_benchmarking/README.md

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Move optional performance patch to the end of README

* Fix README

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Fix typo (#3262)

* Adding new Nav2 Smoother: Savitzky-Golay Smoother (#3264)

* initial prototype of the Savitzky Golay Filter Path Smoother

* fixed indexing issue - tested working

* updates for filter

* adding unit tests for SG-filter smoother

* adding lifecycle transitions

* Added Line Iterator (#3197)

* Added Line Iterator

* Updated Line Iterator to a new iteration method

* Added the resolution as a parameter/ fixed linting

* Added the resolution as a parameter/ fixed linting

* Added unittests for the line iterator

* Added unittests based on "unittest" package

* Fixed __init__.py and rephrased some docstrings

* Fixed linting errors

* Fixed Linting Errors

* Added some unittests and removed some methods

* Dummy commit for CircleCI Issue

Co-authored-by: Afif Swaidan <afif.swaidan@spexal.com>

* bumping to 1.1.3 for release

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>
Co-authored-by: Joshua Wallace <47819219+jwallace42@users.noreply.github.com>
Co-authored-by: Alexey Merzlyakov <60094858+AlexeyMerzlyakov@users.noreply.github.com>
Co-authored-by: Abdullah Enes BEDİR <46785079+enesbedir1@users.noreply.github.com>
Co-authored-by: Tobias Fischer <info@tobiasfischer.info>
Co-authored-by: Tejas Kumar Shastha <tejas.kumar.shastha@ipa.fraunhofer.de>
Co-authored-by: Daisuke Sato <43101027+daisukes@users.noreply.github.com>
Co-authored-by: Stevedan Ogochukwu Omodolor <61468301+stevedanomodolor@users.noreply.github.com>
Co-authored-by: Lukas Fanta <63977366+fantalukas@users.noreply.github.com>
Co-authored-by: Jackson9 <k9632441@gmail.com>
Co-authored-by: Ruffin <roxfoxpox@gmail.com>
Co-authored-by: Hao-Xuan Song <44140526+Cryst4L9527@users.noreply.github.com>
Co-authored-by: Nicolas Rocha Pacheco <n.nicolas98@hotmail.com>
Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>
Co-authored-by: jaeminSHIN <91681721+woawo1213@users.noreply.github.com>
Co-authored-by: Afif Swaidan <53655365+afifswaidan@users.noreply.github.com>
Co-authored-by: Afif Swaidan <afif.swaidan@spexal.com>
hyunseok-yang pushed a commit to lge-ros2/navigation2 that referenced this issue Nov 23, 2022
* standalone assisted teleop (ros-navigation#2904)

* standalone assisted teleop

* added in action message

* code review

* moved to behavior server

* added assisted teleop bt node

* revert

* added bt node for assisted teleop

* lint fix

* added cancel assisted teleop node

* code review

* working

* cleanup

* updated feeback

* code review

* update compute velocity

* cleanup

* lint fixes

* cleanup

* test fix

* starting to add tests for assisted teleop

* fixed tests

* undo

* fixed test

* is_recovery

* adjust abort result based on recovery or not

* code review

* added preempt velocity

* working preempt assisted teleop test

* completed assisted teleop tests

* code review

* undo

* code review

* remove sleep

* topic rename

* missing comma

* added comma :(

* added comma

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Add the support of range sensors to Collision Monitor (ros-navigation#3099)

* Support range sensors in Collision Monitor

* Adjust README.md

* Meet review fixes

* Fix ros-navigation#3152: Costmap extend did not include Y component (ros-navigation#3153)

* missing nodes added to nav2_tree_nodes.xml (ros-navigation#3155)

* Change deprecated ceres function (ros-navigation#3158)

* Change deprecated function

* Update smoother_cost_function.hpp

* remove camera_rgb_joint since child frame does not exist (ros-navigation#3162)

* bugfix (ros-navigation#3109) deadlock when costmap receives new map (ros-navigation#3145)

* bugfix (ros-navigation#3109) deadlock when costmap receives new map

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* introduce map_received_in_update_bounds_ flag to make sure processMap will not be called between updateBounds and updateCosts

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* simple command costmap api - first few functions (ros-navigation#3159)

* initial commit costmap_2d template

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>

* finish task A and tested

* lint

* Update nav2_simple_commander/nav2_simple_commander/costmap_2d.py

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* fix trailing underscores

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>
Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Fix missing dependency on nav2_collision_monitor (ros-navigation#3175)

* fixed start (ros-navigation#3168)

* fixed start

* return true

* fix tests

* Fix velocities comparison for rotation at place case (ros-navigation#3177)

* Fix velocities comparison for rotation at place case

* Meet review item

* Remove unnecessary header

* Change the comment

* set a empty path on halt (ros-navigation#3178)

* set a empty path on halt

* fixed issues

* remove path reset

* fixing

* reverting

* revert

* revert

* fixed lint

* test fix

* uncrusify fix

* simple command costmap api - update few functions (ros-navigation#3169)

* * add aditional function to costmap_2d.py

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>

Updated-by: Jaehun Kim <k9632441@gmail.com>

* finish task B

* Update nav2_simple_commander/nav2_simple_commander/costmap_2d.py

* Update method docs

* Remove underscores at parameters and split getCost into getCostXY and getCostIdx

* Update method docstrings

* lint code & update docstring, remove default value of getCostXY

* lint code with pep257 & flake8

* clear names for bt nodes (ros-navigation#3183)

* [Smac] check if a node exists before creating (ros-navigation#3195)

* check if a node exists before creating

* invert logic to group like with like

* Update a_star.cpp

* fixing benchmarkign for planners (ros-navigation#3202)

* [Smac] Robin hood data structure improves performance by 10-15%! (ros-navigation#3201)

* adding robin_hood unordered_map

* using robin_hood node map

* ignore robin_hood file

* linting

* linting cont. for triple pointers

* linting cont. for uncrustify

* [RPP] Add parameter to enable/disable collision detection (ros-navigation#3204)

* [RPP] Add parameter to enable/disable collision detection

* [RPP] Update README

* Update waffle.model

* add benchmark launch file + instructions (ros-navigation#3218)

* removing hypotf from smac planner heuristic computation (ros-navigation#3217)

* removing hypotf

* swapping to node2d sqrt

* complete smac planner tolerances (ros-navigation#3219)

* Disable Output Buffering (ros-navigation#3220)

To ensure await asyncio prints [Processing: %s]' every 30s as expected

* fix majority of python linting errors introduced in python costmap API additions to get CI turning over again (ros-navigation#3223)

* fix majority of python linting errors

* finish linting

* Assisted teleop simple commander (ros-navigation#3198)

* add assisted teleop to python api

* cleanup

* assisted teleop demo

* rename

* lint

* code review

* trigger build

* flake8 fix

* break cashe

* moved all v11 to v12

* lint fix

* remove package dep

* change default time allowance

* Costmap Filter enabling service (ros-navigation#3229)

* Add enabling service to costmap filters

* Add service testcase

* Fix comment

* Use toggle_filter service name

* Add binary flip costmap filter (ros-navigation#3228)

* Add binary flip costmap filter

* Move transformPose, worldToMask, getMaskData to CostmapFilter

* Added default parametrized binary filter state

* Switched to std_msgs/msg/Bool.msg

* Use arbitrary filter values

* Update waffle.model

* Update waffle.model

* Update test_actions.cpp

* odom alpha restriction to avoid overflow caused by user-misconfiguration (ros-navigation#3238)

* odom alpha restriction

* odom alpha code style

* odom alpha code style

* odom alpha code style

* Update controller server goal checker (ros-navigation#3240)

* [FIX] Update controller server goal checker

* [FIX] Autoformat code

* [FIX] Misplaced tabs.

Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>

* map-size restriction to avoid overflow and nullptr caused by user-misconfiguration (ros-navigation#3242)

* odom alpha restriction

* odom alpha code style

* odom alpha code style

* odom alpha code style

* map-size restriction

* map-size code style

* map-size rejection

* map-size codestyle

* map-size return false

* Add Path Smoothers Benchmarking suite (ros-navigation#3236)

* Add Path Smoothers Benchmarking suite

* Meet review items

* Update tools/smoother_benchmarking/README.md

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Move optional performance patch to the end of README

* Fix README

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Fix typo (ros-navigation#3262)

* Adding new Nav2 Smoother: Savitzky-Golay Smoother (ros-navigation#3264)

* initial prototype of the Savitzky Golay Filter Path Smoother

* fixed indexing issue - tested working

* updates for filter

* adding unit tests for SG-filter smoother

* adding lifecycle transitions

* Added Line Iterator (ros-navigation#3197)

* Added Line Iterator

* Updated Line Iterator to a new iteration method

* Added the resolution as a parameter/ fixed linting

* Added the resolution as a parameter/ fixed linting

* Added unittests for the line iterator

* Added unittests based on "unittest" package

* Fixed __init__.py and rephrased some docstrings

* Fixed linting errors

* Fixed Linting Errors

* Added some unittests and removed some methods

* Dummy commit for CircleCI Issue

Co-authored-by: Afif Swaidan <afif.swaidan@spexal.com>

* bumping to 1.1.3 for release

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>
Co-authored-by: Joshua Wallace <47819219+jwallace42@users.noreply.github.com>
Co-authored-by: Alexey Merzlyakov <60094858+AlexeyMerzlyakov@users.noreply.github.com>
Co-authored-by: Abdullah Enes BEDİR <46785079+enesbedir1@users.noreply.github.com>
Co-authored-by: Tobias Fischer <info@tobiasfischer.info>
Co-authored-by: Tejas Kumar Shastha <tejas.kumar.shastha@ipa.fraunhofer.de>
Co-authored-by: Daisuke Sato <43101027+daisukes@users.noreply.github.com>
Co-authored-by: Stevedan Ogochukwu Omodolor <61468301+stevedanomodolor@users.noreply.github.com>
Co-authored-by: Lukas Fanta <63977366+fantalukas@users.noreply.github.com>
Co-authored-by: Jackson9 <k9632441@gmail.com>
Co-authored-by: Ruffin <roxfoxpox@gmail.com>
Co-authored-by: Hao-Xuan Song <44140526+Cryst4L9527@users.noreply.github.com>
Co-authored-by: Nicolas Rocha Pacheco <n.nicolas98@hotmail.com>
Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>
Co-authored-by: jaeminSHIN <91681721+woawo1213@users.noreply.github.com>
Co-authored-by: Afif Swaidan <53655365+afifswaidan@users.noreply.github.com>
Co-authored-by: Afif Swaidan <afif.swaidan@spexal.com>
jwallace42 pushed a commit to jwallace42/navigation2 that referenced this issue Dec 14, 2022
…os-navigation#3145)

* bugfix (ros-navigation#3109) deadlock when costmap receives new map

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* introduce map_received_in_update_bounds_ flag to make sure processMap will not be called between updateBounds and updateCosts

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
shrijitsingh99 pushed a commit to moss-ag/navigation2 that referenced this issue Mar 4, 2023
* standalone assisted teleop (ros-navigation#2904)

* standalone assisted teleop

* added in action message

* code review

* moved to behavior server

* added assisted teleop bt node

* revert

* added bt node for assisted teleop

* lint fix

* added cancel assisted teleop node

* code review

* working

* cleanup

* updated feeback

* code review

* update compute velocity

* cleanup

* lint fixes

* cleanup

* test fix

* starting to add tests for assisted teleop

* fixed tests

* undo

* fixed test

* is_recovery

* adjust abort result based on recovery or not

* code review

* added preempt velocity

* working preempt assisted teleop test

* completed assisted teleop tests

* code review

* undo

* code review

* remove sleep

* topic rename

* missing comma

* added comma :(

* added comma

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Add the support of range sensors to Collision Monitor (ros-navigation#3099)

* Support range sensors in Collision Monitor

* Adjust README.md

* Meet review fixes

* Fix ros-navigation#3152: Costmap extend did not include Y component (ros-navigation#3153)

* missing nodes added to nav2_tree_nodes.xml (ros-navigation#3155)

* Change deprecated ceres function (ros-navigation#3158)

* Change deprecated function

* Update smoother_cost_function.hpp

* remove camera_rgb_joint since child frame does not exist (ros-navigation#3162)

* bugfix (ros-navigation#3109) deadlock when costmap receives new map (ros-navigation#3145)

* bugfix (ros-navigation#3109) deadlock when costmap receives new map

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* introduce map_received_in_update_bounds_ flag to make sure processMap will not be called between updateBounds and updateCosts

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* simple command costmap api - first few functions (ros-navigation#3159)

* initial commit costmap_2d template

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>

* finish task A and tested

* lint

* Update nav2_simple_commander/nav2_simple_commander/costmap_2d.py

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* fix trailing underscores

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>
Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Fix missing dependency on nav2_collision_monitor (ros-navigation#3175)

* fixed start (ros-navigation#3168)

* fixed start

* return true

* fix tests

* Fix velocities comparison for rotation at place case (ros-navigation#3177)

* Fix velocities comparison for rotation at place case

* Meet review item

* Remove unnecessary header

* Change the comment

* set a empty path on halt (ros-navigation#3178)

* set a empty path on halt

* fixed issues

* remove path reset

* fixing

* reverting

* revert

* revert

* fixed lint

* test fix

* uncrusify fix

* simple command costmap api - update few functions (ros-navigation#3169)

* * add aditional function to costmap_2d.py

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>

Updated-by: Jaehun Kim <k9632441@gmail.com>

* finish task B

* Update nav2_simple_commander/nav2_simple_commander/costmap_2d.py

* Update method docs

* Remove underscores at parameters and split getCost into getCostXY and getCostIdx

* Update method docstrings

* lint code & update docstring, remove default value of getCostXY

* lint code with pep257 & flake8

* clear names for bt nodes (ros-navigation#3183)

* [Smac] check if a node exists before creating (ros-navigation#3195)

* check if a node exists before creating

* invert logic to group like with like

* Update a_star.cpp

* fixing benchmarkign for planners (ros-navigation#3202)

* [Smac] Robin hood data structure improves performance by 10-15%! (ros-navigation#3201)

* adding robin_hood unordered_map

* using robin_hood node map

* ignore robin_hood file

* linting

* linting cont. for triple pointers

* linting cont. for uncrustify

* [RPP] Add parameter to enable/disable collision detection (ros-navigation#3204)

* [RPP] Add parameter to enable/disable collision detection

* [RPP] Update README

* Update waffle.model

* add benchmark launch file + instructions (ros-navigation#3218)

* removing hypotf from smac planner heuristic computation (ros-navigation#3217)

* removing hypotf

* swapping to node2d sqrt

* complete smac planner tolerances (ros-navigation#3219)

* Disable Output Buffering (ros-navigation#3220)

To ensure await asyncio prints [Processing: %s]' every 30s as expected

* fix majority of python linting errors introduced in python costmap API additions to get CI turning over again (ros-navigation#3223)

* fix majority of python linting errors

* finish linting

* Assisted teleop simple commander (ros-navigation#3198)

* add assisted teleop to python api

* cleanup

* assisted teleop demo

* rename

* lint

* code review

* trigger build

* flake8 fix

* break cashe

* moved all v11 to v12

* lint fix

* remove package dep

* change default time allowance

* Costmap Filter enabling service (ros-navigation#3229)

* Add enabling service to costmap filters

* Add service testcase

* Fix comment

* Use toggle_filter service name

* Add binary flip costmap filter (ros-navigation#3228)

* Add binary flip costmap filter

* Move transformPose, worldToMask, getMaskData to CostmapFilter

* Added default parametrized binary filter state

* Switched to std_msgs/msg/Bool.msg

* Use arbitrary filter values

* Update waffle.model

* Update waffle.model

* Update test_actions.cpp

* odom alpha restriction to avoid overflow caused by user-misconfiguration (ros-navigation#3238)

* odom alpha restriction

* odom alpha code style

* odom alpha code style

* odom alpha code style

* Update controller server goal checker (ros-navigation#3240)

* [FIX] Update controller server goal checker

* [FIX] Autoformat code

* [FIX] Misplaced tabs.

Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>

* map-size restriction to avoid overflow and nullptr caused by user-misconfiguration (ros-navigation#3242)

* odom alpha restriction

* odom alpha code style

* odom alpha code style

* odom alpha code style

* map-size restriction

* map-size code style

* map-size rejection

* map-size codestyle

* map-size return false

* Add Path Smoothers Benchmarking suite (ros-navigation#3236)

* Add Path Smoothers Benchmarking suite

* Meet review items

* Update tools/smoother_benchmarking/README.md

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Move optional performance patch to the end of README

* Fix README

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Fix typo (ros-navigation#3262)

* Adding new Nav2 Smoother: Savitzky-Golay Smoother (ros-navigation#3264)

* initial prototype of the Savitzky Golay Filter Path Smoother

* fixed indexing issue - tested working

* updates for filter

* adding unit tests for SG-filter smoother

* adding lifecycle transitions

* Added Line Iterator (ros-navigation#3197)

* Added Line Iterator

* Updated Line Iterator to a new iteration method

* Added the resolution as a parameter/ fixed linting

* Added the resolution as a parameter/ fixed linting

* Added unittests for the line iterator

* Added unittests based on "unittest" package

* Fixed __init__.py and rephrased some docstrings

* Fixed linting errors

* Fixed Linting Errors

* Added some unittests and removed some methods

* Dummy commit for CircleCI Issue

Co-authored-by: Afif Swaidan <afif.swaidan@spexal.com>

* bumping to 1.1.3 for release

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>
Co-authored-by: Joshua Wallace <47819219+jwallace42@users.noreply.github.com>
Co-authored-by: Alexey Merzlyakov <60094858+AlexeyMerzlyakov@users.noreply.github.com>
Co-authored-by: Abdullah Enes BEDİR <46785079+enesbedir1@users.noreply.github.com>
Co-authored-by: Tobias Fischer <info@tobiasfischer.info>
Co-authored-by: Tejas Kumar Shastha <tejas.kumar.shastha@ipa.fraunhofer.de>
Co-authored-by: Daisuke Sato <43101027+daisukes@users.noreply.github.com>
Co-authored-by: Stevedan Ogochukwu Omodolor <61468301+stevedanomodolor@users.noreply.github.com>
Co-authored-by: Lukas Fanta <63977366+fantalukas@users.noreply.github.com>
Co-authored-by: Jackson9 <k9632441@gmail.com>
Co-authored-by: Ruffin <roxfoxpox@gmail.com>
Co-authored-by: Hao-Xuan Song <44140526+Cryst4L9527@users.noreply.github.com>
Co-authored-by: Nicolas Rocha Pacheco <n.nicolas98@hotmail.com>
Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>
Co-authored-by: jaeminSHIN <91681721+woawo1213@users.noreply.github.com>
Co-authored-by: Afif Swaidan <53655365+afifswaidan@users.noreply.github.com>
Co-authored-by: Afif Swaidan <afif.swaidan@spexal.com>
shrijitsingh99 pushed a commit to moss-ag/navigation2 that referenced this issue Mar 4, 2023
* standalone assisted teleop (ros-navigation#2904)

* standalone assisted teleop

* added in action message

* code review

* moved to behavior server

* added assisted teleop bt node

* revert

* added bt node for assisted teleop

* lint fix

* added cancel assisted teleop node

* code review

* working

* cleanup

* updated feeback

* code review

* update compute velocity

* cleanup

* lint fixes

* cleanup

* test fix

* starting to add tests for assisted teleop

* fixed tests

* undo

* fixed test

* is_recovery

* adjust abort result based on recovery or not

* code review

* added preempt velocity

* working preempt assisted teleop test

* completed assisted teleop tests

* code review

* undo

* code review

* remove sleep

* topic rename

* missing comma

* added comma :(

* added comma

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Add the support of range sensors to Collision Monitor (ros-navigation#3099)

* Support range sensors in Collision Monitor

* Adjust README.md

* Meet review fixes

* Fix ros-navigation#3152: Costmap extend did not include Y component (ros-navigation#3153)

* missing nodes added to nav2_tree_nodes.xml (ros-navigation#3155)

* Change deprecated ceres function (ros-navigation#3158)

* Change deprecated function

* Update smoother_cost_function.hpp

* remove camera_rgb_joint since child frame does not exist (ros-navigation#3162)

* bugfix (ros-navigation#3109) deadlock when costmap receives new map (ros-navigation#3145)

* bugfix (ros-navigation#3109) deadlock when costmap receives new map

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* introduce map_received_in_update_bounds_ flag to make sure processMap will not be called between updateBounds and updateCosts

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>

* simple command costmap api - first few functions (ros-navigation#3159)

* initial commit costmap_2d template

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>

* finish task A and tested

* lint

* Update nav2_simple_commander/nav2_simple_commander/costmap_2d.py

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* fix trailing underscores

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>
Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Fix missing dependency on nav2_collision_monitor (ros-navigation#3175)

* fixed start (ros-navigation#3168)

* fixed start

* return true

* fix tests

* Fix velocities comparison for rotation at place case (ros-navigation#3177)

* Fix velocities comparison for rotation at place case

* Meet review item

* Remove unnecessary header

* Change the comment

* set a empty path on halt (ros-navigation#3178)

* set a empty path on halt

* fixed issues

* remove path reset

* fixing

* reverting

* revert

* revert

* fixed lint

* test fix

* uncrusify fix

* simple command costmap api - update few functions (ros-navigation#3169)

* * add aditional function to costmap_2d.py

Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>

Updated-by: Jaehun Kim <k9632441@gmail.com>

* finish task B

* Update nav2_simple_commander/nav2_simple_commander/costmap_2d.py

* Update method docs

* Remove underscores at parameters and split getCost into getCostXY and getCostIdx

* Update method docstrings

* lint code & update docstring, remove default value of getCostXY

* lint code with pep257 & flake8

* clear names for bt nodes (ros-navigation#3183)

* [Smac] check if a node exists before creating (ros-navigation#3195)

* check if a node exists before creating

* invert logic to group like with like

* Update a_star.cpp

* fixing benchmarkign for planners (ros-navigation#3202)

* [Smac] Robin hood data structure improves performance by 10-15%! (ros-navigation#3201)

* adding robin_hood unordered_map

* using robin_hood node map

* ignore robin_hood file

* linting

* linting cont. for triple pointers

* linting cont. for uncrustify

* [RPP] Add parameter to enable/disable collision detection (ros-navigation#3204)

* [RPP] Add parameter to enable/disable collision detection

* [RPP] Update README

* Update waffle.model

* add benchmark launch file + instructions (ros-navigation#3218)

* removing hypotf from smac planner heuristic computation (ros-navigation#3217)

* removing hypotf

* swapping to node2d sqrt

* complete smac planner tolerances (ros-navigation#3219)

* Disable Output Buffering (ros-navigation#3220)

To ensure await asyncio prints [Processing: %s]' every 30s as expected

* fix majority of python linting errors introduced in python costmap API additions to get CI turning over again (ros-navigation#3223)

* fix majority of python linting errors

* finish linting

* Assisted teleop simple commander (ros-navigation#3198)

* add assisted teleop to python api

* cleanup

* assisted teleop demo

* rename

* lint

* code review

* trigger build

* flake8 fix

* break cashe

* moved all v11 to v12

* lint fix

* remove package dep

* change default time allowance

* Costmap Filter enabling service (ros-navigation#3229)

* Add enabling service to costmap filters

* Add service testcase

* Fix comment

* Use toggle_filter service name

* Add binary flip costmap filter (ros-navigation#3228)

* Add binary flip costmap filter

* Move transformPose, worldToMask, getMaskData to CostmapFilter

* Added default parametrized binary filter state

* Switched to std_msgs/msg/Bool.msg

* Use arbitrary filter values

* Update waffle.model

* Update waffle.model

* Update test_actions.cpp

* odom alpha restriction to avoid overflow caused by user-misconfiguration (ros-navigation#3238)

* odom alpha restriction

* odom alpha code style

* odom alpha code style

* odom alpha code style

* Update controller server goal checker (ros-navigation#3240)

* [FIX] Update controller server goal checker

* [FIX] Autoformat code

* [FIX] Misplaced tabs.

Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>

* map-size restriction to avoid overflow and nullptr caused by user-misconfiguration (ros-navigation#3242)

* odom alpha restriction

* odom alpha code style

* odom alpha code style

* odom alpha code style

* map-size restriction

* map-size code style

* map-size rejection

* map-size codestyle

* map-size return false

* Add Path Smoothers Benchmarking suite (ros-navigation#3236)

* Add Path Smoothers Benchmarking suite

* Meet review items

* Update tools/smoother_benchmarking/README.md

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Move optional performance patch to the end of README

* Fix README

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* Fix typo (ros-navigation#3262)

* Adding new Nav2 Smoother: Savitzky-Golay Smoother (ros-navigation#3264)

* initial prototype of the Savitzky Golay Filter Path Smoother

* fixed indexing issue - tested working

* updates for filter

* adding unit tests for SG-filter smoother

* adding lifecycle transitions

* Added Line Iterator (ros-navigation#3197)

* Added Line Iterator

* Updated Line Iterator to a new iteration method

* Added the resolution as a parameter/ fixed linting

* Added the resolution as a parameter/ fixed linting

* Added unittests for the line iterator

* Added unittests based on "unittest" package

* Fixed __init__.py and rephrased some docstrings

* Fixed linting errors

* Fixed Linting Errors

* Added some unittests and removed some methods

* Dummy commit for CircleCI Issue

Co-authored-by: Afif Swaidan <afif.swaidan@spexal.com>

* bumping to 1.1.3 for release

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
Signed-off-by: Stevedan Omodolor <stevedan.o.omodolor@gmail.com>
Co-authored-by: Joshua Wallace <47819219+jwallace42@users.noreply.github.com>
Co-authored-by: Alexey Merzlyakov <60094858+AlexeyMerzlyakov@users.noreply.github.com>
Co-authored-by: Abdullah Enes BEDİR <46785079+enesbedir1@users.noreply.github.com>
Co-authored-by: Tobias Fischer <info@tobiasfischer.info>
Co-authored-by: Tejas Kumar Shastha <tejas.kumar.shastha@ipa.fraunhofer.de>
Co-authored-by: Daisuke Sato <43101027+daisukes@users.noreply.github.com>
Co-authored-by: Stevedan Ogochukwu Omodolor <61468301+stevedanomodolor@users.noreply.github.com>
Co-authored-by: Lukas Fanta <63977366+fantalukas@users.noreply.github.com>
Co-authored-by: Jackson9 <k9632441@gmail.com>
Co-authored-by: Ruffin <roxfoxpox@gmail.com>
Co-authored-by: Hao-Xuan Song <44140526+Cryst4L9527@users.noreply.github.com>
Co-authored-by: Nicolas Rocha Pacheco <n.nicolas98@hotmail.com>
Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>
Co-authored-by: jaeminSHIN <91681721+woawo1213@users.noreply.github.com>
Co-authored-by: Afif Swaidan <53655365+afifswaidan@users.noreply.github.com>
Co-authored-by: Afif Swaidan <afif.swaidan@spexal.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants