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 velocity based polygon #3708

Merged
merged 36 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a2622f7
add velocity based polygon
kaichie Jul 23, 2023
ac4045f
fix header, copyright and variable name change
kaichie Jul 24, 2023
763b432
optimise polygon update
kaichie Jul 24, 2023
489392a
optimise duplicated code with setPolygonShape
kaichie Jul 24, 2023
727060c
add warning log for uncovered speed
kaichie Jul 24, 2023
3d9e979
Merge remote-tracking branch 'upstream/main' into add_polygon_velocity
kaichie Sep 2, 2023
50fd22c
update feedback
kaichie Sep 3, 2023
b6a05e2
rename polygon velocity to velocity polygon
kaichie Sep 3, 2023
b0a1093
cleanup
kaichie Sep 3, 2023
f1de5f9
fix typo
kaichie Sep 3, 2023
43c28d0
add dynamic support for velocity polygon
kaichie Sep 24, 2023
c2098b6
Merge remote-tracking branch 'upstream/main' into add_polygon_velocity
kaichie Sep 24, 2023
f6b2b19
wrap try catch for getting parameters
kaichie Sep 24, 2023
7f9f55a
update naming and linting
kaichie Sep 24, 2023
1230ede
use switch case
kaichie Sep 25, 2023
cd1af8a
Revert "use switch case"
kaichie Sep 26, 2023
2c4181e
fix proper return for invalid parameters
kaichie Sep 26, 2023
400d45e
remove topic parameter for velocity polygon
kaichie Sep 26, 2023
b97cbb7
fix formatting manually
kaichie Sep 26, 2023
5dc403b
continue if points are not defined
kaichie Sep 26, 2023
3db0146
Merge branch 'main' into add_polygon_velocity
kaichie Nov 16, 2023
8491ed4
Merge branch 'main' into add_polygon_velocity
kaichie Dec 5, 2023
a5c48a7
Merge branch 'main' into add_polygon_velocity
kaichie Jan 2, 2024
abab066
rewrite velocity polygon with polygon base class
kaichie Jan 7, 2024
620c7c2
update review comments and description
kaichie Jan 7, 2024
898d8c0
add VelocityPolygon to detector node
kaichie Jan 7, 2024
940225c
review update
kaichie Jan 16, 2024
0a7fe8c
fix cpplint
kaichie Jan 16, 2024
680f7ca
Merge remote-tracking branch 'upstream/main' into add_polygon_velocity
kaichie Jan 16, 2024
5c5d184
Update nav2_collision_monitor/src/velocity_polygon.cpp
kaichie Jan 17, 2024
49d7b71
add velocity polygon tests
kaichie Jan 17, 2024
ee69105
fix cpplint
kaichie Jan 17, 2024
10d59e1
add in-line comment
kaichie Jan 17, 2024
bbcb930
fix push back
kaichie Jan 17, 2024
df2cb95
minor change and update README
kaichie Jan 20, 2024
e150e85
update README
kaichie Jan 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion nav2_collision_monitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ The zones around the robot can take the following shapes:
* Arbitrary user-defined polygon relative to the robot base frame, which can be static in a configuration file or dynamically changing via a topic interface.
* Robot footprint polygon, which is used in the approach behavior model only. Will use the static user-defined polygon or the footprint topic to allow it to be dynamically adjusted over time.
* Circle: is made for the best performance and could be used in the cases where the zone or robot footprint could be approximated by round shape.
* VelocityPolygon: allow switching of polygons based on the command velocity. This is useful for robots to set different safety zones based on their velocity (e.g. a robot that has a larger safety zone when moving at 1.0 m/s than when moving at 0.5 m/s).


The data may be obtained from different data sources:

Expand All @@ -48,7 +50,7 @@ The data may be obtained from different data sources:
The Collision Monitor is designed to operate below Nav2 as an independent safety node.
This acts as a filter on the `cmd_vel` topic coming out of the Controller Server. If no such zone is triggered, then the Controller's `cmd_vel` is used. Else, it is scaled or set to stop as appropriate.

The following diagram is showing the high-level design of Collision Monitor module. All shapes (Polygons and Circles) are derived from base `Polygon` class, so without loss of generality we can call them as polygons. Subscribed footprint is also having the same properties as other polygons, but it is being obtained a footprint topic for the Approach Model.
The following diagram is showing the high-level design of Collision Monitor module. All shapes (`Polygon`, `Circle` and `VelocityPolygon`) are derived from base `Polygon` class, so without loss of generality we can call them as polygons. Subscribed footprint is also having the same properties as other polygons, but it is being obtained a footprint topic for the Approach Model.
SteveMacenski marked this conversation as resolved.
Show resolved Hide resolved
![HLD.png](doc/HLD.png)
### Configuration

Expand Down
4 changes: 1 addition & 3 deletions nav2_collision_monitor/params/collision_monitor_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@ collision_monitor:
VelocityPolygonStop:
type: "velocity_polygon"
action_type: "stop"
time_before_collision: 2.0
simulation_time_step: 0.1
min_points: 6
visualize: True
enabled: True
polygon_pub_topic: "polygon_approach"
polygon_pub_topic: "velocity_polygon_stop"
velocity_polygons: ["rotation", "translation_forward", "translation_backward", "stopped"]
holonomic: false
rotation:
Expand Down
Loading