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

Add Speed Limit Requests #222

Conversation

PranayShirodkar
Copy link
Contributor

@PranayShirodkar PranayShirodkar commented Aug 16, 2022

Changes

continuous_checker

  • Add continuous_checker param to LaneBlocker node. This param is a bool with default value false.
  • If obstacles are static, continuous_checker should be left as false. If obstacles are dynamic/moving, set continuous_checker to true.
  • When continuous_checker is false, the LaneBlocker node will only check an obstacle for intersection with all lanes when the obstacle first appears.
  • When continuous_checker is true, the LaneBlocker node will continuously check an obstacle for intersection with all lanes as long as the obstacle is present.

add speed limits

  • Lanes can now be in Closed state, Speed Limited state and normal state
  • Refactored the lane open and lane close msg creation and sending
  • Add speed limit and speed unlimit msg
  • Handle all 6 possible state transitions
  • Add python bindings for agv::FleetUpdateHandle::limit_lane_speeds() and agv::FleetUpdateHandle::remove_speed_limits() - related PR in rmf_demos

Signed-off-by: Pranay Shirodkar <[email protected]>
@PranayShirodkar PranayShirodkar marked this pull request as ready for review August 18, 2022 10:03
@mxgrey
Copy link
Contributor

mxgrey commented Sep 16, 2022

@Yadunund since this is targeting your draft PR #210 I'll leave it up to you if/when/how this gets merged.

Copy link
Member

@Yadunund Yadunund left a comment

Choose a reason for hiding this comment

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

I've left TODOs for things to address before merging into main. Fixed const correctness and made an API tweak to the publisher functions to prevent segfaults if the unordered_maps containing the unique_ptrs are accessed after moving the messaging during publish().

@Yadunund Yadunund merged commit 49b5e6e into open-rmf:feature/rmf_obstacle Nov 22, 2022
Yadunund added a commit that referenced this pull request Mar 16, 2024
* add FleetUpdateHandle speed limit API to python bindings

Signed-off-by: Pranay Shirodkar <[email protected]>

* add continuous checker option for dynamic obstacles

Signed-off-by: Pranay Shirodkar <[email protected]>

* refactor Lane Close and Open msg building

Signed-off-by: Pranay Shirodkar <[email protected]>

* add speed limits

Signed-off-by: Pranay Shirodkar <[email protected]>

* Fix style

Signed-off-by: Yadunund <[email protected]>

* Fix const correctness and do not pass unordered_map by ref to publisher

Signed-off-by: Yadunund <[email protected]>

Signed-off-by: Pranay Shirodkar <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Co-authored-by: Yadunund <[email protected]>
Co-authored-by: Yadunund <[email protected]>
Yadunund added a commit that referenced this pull request Mar 18, 2024
* add FleetUpdateHandle speed limit API to python bindings



* add continuous checker option for dynamic obstacles



* refactor Lane Close and Open msg building



* add speed limits



* Fix style



* Fix const correctness and do not pass unordered_map by ref to publisher

Signed-off-by: Pranay Shirodkar <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Co-authored-by: Pranay Shirodkar <[email protected]>
Yadunund added a commit that referenced this pull request Mar 18, 2024
author Yadunund <[email protected]> 1652352947 +0800
committer Yadunund <[email protected]> 1710732926 +0800
gpgsig -----BEGIN PGP SIGNATURE-----

 iQJOBAABCgA4FiEEGyIX6IDAjj8gmqGLhzPx+bEFxS0FAmX3tn4aHHlhZHVudW5k
 QG9wZW5yb2JvdGljcy5vcmcACgkQhzPx+bEFxS1ZdhAAjREHmggorWRf7flK33VG
 dRzCWyEB3jRHL++7+XoNtT9dSBVzqNlaHohySw2elz43cGhlPmNZxPm+o+k6vk6g
 zskYKgiOLCVVbb0xZY3zYU6PgPZ5hHpHkC9Em0L4B86o5lNzhWL7BSJl+Lq0InWa
 CPjBHNhNqmg4jlcZpFL85WA00kbKxmDKYBn/6xpAm6rCxiBLcIYxKEPjS1ETjw4Y
 nziSAwPeyR3TDS/FVJ73eHzn8FdfJdx3omXgU9Cfd6Q4SPreXEO9pQEsG8x3oNQy
 /Hg6BhLd25jUMpkU8CKyWIlA1RtyylToSV+ASOlp6Hf4zXwKAOB3z+WHN2F1oort
 9UiFwwFR8Hf5fXnWjFiIYlYs4vAYCkPkTX2aZIsbua77xcfqBUarQIvHU8CBhpWn
 xVmGRcAraO2aobhg2M4CbMmvWo5HK1L3+CMua2ggFiAAWcaPRNTfcnqs98goIMj7
 Z2WFyUukiXc0KtglyM6dYGnJQs+gcmJw1bUNvPMzFLLFxI8Eu0E3HHWQm06ylHlF
 TfKju8KtGe674Twg8CDkFn/VInIxj7u5a+J1LU+J0VI0HspRA7iccSaw0nBZ8Jay
 ncVVzW17IWNBD1lvHYt1aj2UrHrrlJF8WamKgNrzRSkqphyvj71s6fkVdddgopFw
 siJKNIq86U63df76k21XtBc=
 =hDJO
 -----END PGP SIGNATURE-----

Added ObstacleManager

Signed-off-by: Yadunund <[email protected]>

Moved ObstacleManager into src

Signed-off-by: Yadunund <[email protected]>

Build as ROS 2 component. Dynamically load detector and responder plugins

Signed-off-by: Yadunund <[email protected]>

Refactor into data struct

Signed-off-by: Yadunund <[email protected]>

Uncrustify

Signed-off-by: Yadunund <[email protected]>

Serialize using octomap

Signed-off-by: Yadunund <[email protected]>

Removed ObstacleData

Signed-off-by: Yadunund <[email protected]>

Detector accepts a callback

Signed-off-by: Yadunund <[email protected]>

Export dependencies

Signed-off-by: Yadunund <[email protected]>

Export include dir

Signed-off-by: Yadunund <[email protected]>

Explicitly link pluginlib

Signed-off-by: Yadunund <[email protected]>

Keep ClassLoaders alive

Signed-off-by: Yadunund <[email protected]>

Add skeleton for LaneBlocker

Signed-off-by: Yadunund <[email protected]>

Publish nav graph

Signed-off-by: Yadunund <[email protected]>

Use api from rmf_traffic_ros2 for graph serialization

Signed-off-by: Yadunund <[email protected]>

Compute transfroms to rmf frame

Signed-off-by: Yadunund <[email protected]>

Added skeletop for processing

Signed-off-by: Yadunund <[email protected]>

Added logic for publishing lane closures

Signed-off-by: Yadunund <[email protected]>

Add cull timer

Signed-off-by: Yadunund <[email protected]>

Finished implementing cull

Signed-off-by: Yadunund <[email protected]>

Updated intersection checker

Signed-off-by: Yadunund <[email protected]>

WIP

Signed-off-by: Yadunund <[email protected]>

Fix tf2_geometry_msgs dep for humble

Signed-off-by: Yadunund <[email protected]>

Rough collision check implementation

Signed-off-by: Yadunund <[email protected]>

Added tests for IntersectionChecker

Signed-off-by: Yadunund <[email protected]>

Fixes to SAT

Signed-off-by: Yadunund <[email protected]>

Debug rotation

Signed-off-by: Yadunund <[email protected]>

Kinda working

Signed-off-by: Yadunund <[email protected]>

Use lowest not min

Signed-off-by: Yadunund <[email protected]>

Added more failing tests

Signed-off-by: Yadunund <[email protected]>

Use dist

Signed-off-by: Yadunund <[email protected]>

Cleanup

Signed-off-by: Yadunund <[email protected]>

Many logic fixes

Signed-off-by: Yadunund <[email protected]>

Uncrustify

Signed-off-by: Yadunund <[email protected]>

Refactor

Signed-off-by: Yadunund <[email protected]>

Fix API and use bb msgs from rmf_obstacle_ros2

Signed-off-by: Yadunund <[email protected]>

Simplify pkg

Signed-off-by: Yadunund <[email protected]>

Fix rmf_obstacle_ros2 intersection checker (#219)

* fix intersection checker

Signed-off-by: Pranay Shirodkar <[email protected]>

* fix uncrustify and build warning

Signed-off-by: Pranay Shirodkar <[email protected]>

* use Eigen library for transformations

Signed-off-by: Pranay Shirodkar <[email protected]>

* cleanup

Signed-off-by: Pranay Shirodkar <[email protected]>

Use local bb2d

Signed-off-by: Yadunund <[email protected]>

Uncrustify

Signed-off-by: Yadunund <[email protected]>

Added feeback

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

Add Speed Limit Requests (#222)

* add FleetUpdateHandle speed limit API to python bindings

Signed-off-by: Pranay Shirodkar <[email protected]>

* add continuous checker option for dynamic obstacles

Signed-off-by: Pranay Shirodkar <[email protected]>

* refactor Lane Close and Open msg building

Signed-off-by: Pranay Shirodkar <[email protected]>

* add speed limits

Signed-off-by: Pranay Shirodkar <[email protected]>

* Fix style

Signed-off-by: Yadunund <[email protected]>

* Fix const correctness and do not pass unordered_map by ref to publisher

Signed-off-by: Yadunund <[email protected]>

Signed-off-by: Pranay Shirodkar <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Co-authored-by: Yadunund <[email protected]>
Co-authored-by: Yadunund <[email protected]>

Filled PointCloud message

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

Insert lanes with their state

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

Added MessageFilter to rmf_obstacles topic

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

Added optional return value to deserialize_key method

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

Combine close/open and limit/unlimit functions

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

 Use member variables instead of passing unordered_maps by reference between these functions

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

Defined templated pure abstract class to perform serialization/deserialization

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

Fix build

Signed-off-by: Yadunund <[email protected]>

Link against targets in test

Signed-off-by: Yadunund <[email protected]>

Restore files

Signed-off-by: Yadunund <[email protected]>
Yadunund added a commit that referenced this pull request Mar 18, 2024
* Publish nav graph

Signed-off-by: Yadunund <[email protected]>

* Added ObstacleManager

Signed-off-by: Yadunund <[email protected]>

* Moved ObstacleManager into src

Signed-off-by: Yadunund <[email protected]>

* Build as ROS 2 component. Dynamically load detector and responder plugins

Signed-off-by: Yadunund <[email protected]>

* Refactor into data struct

Signed-off-by: Yadunund <[email protected]>

* Uncrustify

Signed-off-by: Yadunund <[email protected]>

* Serialize using octomap

Signed-off-by: Yadunund <[email protected]>

* Removed ObstacleData

Signed-off-by: Yadunund <[email protected]>

* Detector accepts a callback

Signed-off-by: Yadunund <[email protected]>

* Export dependencies

Signed-off-by: Yadunund <[email protected]>

* Export include dir

Signed-off-by: Yadunund <[email protected]>

* Explicitly link pluginlib

Signed-off-by: Yadunund <[email protected]>

* Keep ClassLoaders alive

Signed-off-by: Yadunund <[email protected]>

* Revert to msg builder API

Signed-off-by: Yadunund <[email protected]>

* Explicitly include message headers

Signed-off-by: Yadunund <[email protected]>

* Add skeleton for LaneBlocker

Signed-off-by: Yadunund <[email protected]>

* Use api from rmf_traffic_ros2 for graph serialization

Signed-off-by: Yadunund <[email protected]>

* Fix typo

Signed-off-by: Yadunund <[email protected]>

* Uncrustify

Signed-off-by: Yadunund <[email protected]>

* Implement speed limit API and publish lane_states

Signed-off-by: Yadunund <[email protected]>

* Added speed limit request interface to legacy full_control

Signed-off-by: Yadunund <[email protected]>

* Uncrustify

Signed-off-by: Yadunund <[email protected]>

* Compute transfroms to rmf frame

Signed-off-by: Yadunund <[email protected]>

* Added skeletop for processing

Signed-off-by: Yadunund <[email protected]>

* Warn users of unsupported speed limits

Signed-off-by: Yadunund <[email protected]>

* Serialize/deserialize speed limits

Signed-off-by: Yadunund <[email protected]>

* Added logic for publishing lane closures

Signed-off-by: Yadunund <[email protected]>

* Add cull timer

Signed-off-by: Yadunund <[email protected]>

* Finished implementing cull

Signed-off-by: Yadunund <[email protected]>

* Updated intersection checker

Signed-off-by: Yadunund <[email protected]>

* WIP

Signed-off-by: Yadunund <[email protected]>

* Fix tf2_geometry_msgs dep for humble

Signed-off-by: Yadunund <[email protected]>

* Rough collision check implementation

Signed-off-by: Yadunund <[email protected]>

* Added tests for IntersectionChecker

Signed-off-by: Yadunund <[email protected]>

* Fixes to SAT

Signed-off-by: Yadunund <[email protected]>

* Debug rotation

Signed-off-by: Yadunund <[email protected]>

* Kinda working

Signed-off-by: Yadunund <[email protected]>

* Use lowest not min

Signed-off-by: Yadunund <[email protected]>

* Added more failing tests

Signed-off-by: Yadunund <[email protected]>

* Use dist

Signed-off-by: Yadunund <[email protected]>

* Cleanup

Signed-off-by: Yadunund <[email protected]>

* Many logic fixes

Signed-off-by: Yadunund <[email protected]>

* Uncrustify

Signed-off-by: Yadunund <[email protected]>

* Refactor

Signed-off-by: Yadunund <[email protected]>

* Fix API and use bb msgs from rmf_obstacle_ros2

Signed-off-by: Yadunund <[email protected]>

* Simplify pkg

Signed-off-by: Yadunund <[email protected]>

* Fix rmf_obstacle_ros2 intersection checker (#219)

* fix intersection checker

Signed-off-by: Pranay Shirodkar <[email protected]>

* fix uncrustify and build warning

Signed-off-by: Pranay Shirodkar <[email protected]>

* use Eigen library for transformations

Signed-off-by: Pranay Shirodkar <[email protected]>

* cleanup

Signed-off-by: Pranay Shirodkar <[email protected]>

* Use local bb2d

Signed-off-by: Yadunund <[email protected]>

* Uncrustify

Signed-off-by: Yadunund <[email protected]>

* Added feeback

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

* Add Speed Limit Requests (#222)

* add FleetUpdateHandle speed limit API to python bindings

Signed-off-by: Pranay Shirodkar <[email protected]>

* add continuous checker option for dynamic obstacles

Signed-off-by: Pranay Shirodkar <[email protected]>

* refactor Lane Close and Open msg building

Signed-off-by: Pranay Shirodkar <[email protected]>

* add speed limits

Signed-off-by: Pranay Shirodkar <[email protected]>

* Fix style

Signed-off-by: Yadunund <[email protected]>

* Fix const correctness and do not pass unordered_map by ref to publisher

Signed-off-by: Yadunund <[email protected]>

Signed-off-by: Pranay Shirodkar <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Co-authored-by: Yadunund <[email protected]>
Co-authored-by: Yadunund <[email protected]>

* Filled PointCloud message

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

* Insert lanes with their state

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

* Added MessageFilter to rmf_obstacles topic

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

* Added optional return value to deserialize_key method

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

* Combine close/open and limit/unlimit functions

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

* Use member variables instead of passing unordered_maps by reference between these functions

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

* Defined templated pure abstract class to perform serialization/deserialization

Signed-off-by: Alejandro Hernández Cordero <[email protected]>

* Fix build

Signed-off-by: Yadunund <[email protected]>

* Link against targets in test

Signed-off-by: Yadunund <[email protected]>

---------

Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Pranay Shirodkar <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Co-authored-by: Pranay Shirodkar <[email protected]>
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
arjo129 pushed a commit that referenced this pull request Jun 7, 2024
* add FleetUpdateHandle speed limit API to python bindings

* add continuous checker option for dynamic obstacles

* refactor Lane Close and Open msg building

* add speed limits

* Fix style

* Fix const correctness and do not pass unordered_map by ref to publisher

Signed-off-by: Pranay Shirodkar <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Co-authored-by: Pranay Shirodkar <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
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.

3 participants