From 503aefaf5b289620130c94ded8c83bf2f2ccde40 Mon Sep 17 00:00:00 2001 From: Tony Najjar Date: Wed, 27 Sep 2023 11:29:14 +0200 Subject: [PATCH 1/7] Add docs for #3825 --- .../configuring-collision-detector-node.rst | 21 +++++++++++++++ .../configuring-collision-monitor-node.rst | 26 +++++++++++++++++++ migration/Iron.rst | 5 ++++ 3 files changed, 52 insertions(+) diff --git a/configuration/packages/collision_monitor/configuring-collision-detector-node.rst b/configuration/packages/collision_monitor/configuring-collision-detector-node.rst index d3cae7633..3d9b1b18a 100644 --- a/configuration/packages/collision_monitor/configuring-collision-detector-node.rst +++ b/configuration/packages/collision_monitor/configuring-collision-detector-node.rst @@ -204,7 +204,16 @@ Polygons parameters Description: Topic name to publish a polygon to. Used only if ``visualize`` is true. +:````.enabled: + ============== ============================= + Type Default + -------------- ----------------------------- + bool True + ============== ============================= + + Description: + Whether to use this source for collision detection. (Can be dynamically set) Observation sources parameters ============================== @@ -266,6 +275,16 @@ Observation sources parameters Description: Angle increment (in radians) between nearby obstacle points at the range arc. Two outermost points from the field of view are not taken into account (they will always exist regardless of this value). Applicable for ``range`` type. +:````.enabled: + + ============== ============================= + Type Default + -------------- ----------------------------- + bool True + ============== ============================= + + Description: + Whether to use this source for collision detection. (Can be dynamically set) Example ******* @@ -293,9 +312,11 @@ Here is an example of configuration YAML for the Collision Detector. scan: type: "scan" topic: "scan" + enabled: True pointcloud: type: "pointcloud" topic: "/intel_realsense_r200_depth/points" min_height: 0.1 max_height: 0.5 + enabled: True diff --git a/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst b/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst index 2b2255d79..86b2f0ddc 100644 --- a/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst +++ b/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst @@ -342,7 +342,16 @@ Polygons parameters Description: Topic name to publish a polygon to. Used only if ``visualize`` is true. +:````.enabled: + ============== ============================= + Type Default + -------------- ----------------------------- + bool True + ============== ============================= + + Description: + Whether to use this polygon for collision monitoring. (Can be dynamically set) Observation sources parameters ============================== @@ -404,6 +413,17 @@ Observation sources parameters Description: Angle increment (in radians) between nearby obstacle points at the range arc. Two outermost points from the field of view are not taken into account (they will always exist regardless of this value). Applicable for ``range`` type. +:````.enabled: + + ============== ============================= + Type Default + -------------- ----------------------------- + bool True + ============== ============================= + + Description: + Whether to use this source for collision monitoring. (Can be dynamically set) + Example ******* @@ -431,6 +451,7 @@ Here is an example of configuration YAML for the Collision Monitor. min_points: 4 # max_points: 3 for Humble visualize: True polygon_pub_topic: "polygon_stop" + enabled: True PolygonSlow: type: "polygon" points: [1.0, 1.0, 1.0, -1.0, -0.5, -1.0, -0.5, 1.0] @@ -439,6 +460,7 @@ Here is an example of configuration YAML for the Collision Monitor. slowdown_ratio: 0.3 visualize: True polygon_pub_topic: "polygon_slowdown" + enabled: True PolygonLimit: type: "polygon" points: [0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5] @@ -448,6 +470,7 @@ Here is an example of configuration YAML for the Collision Monitor. angular_limit: 0.5 visualize: True polygon_pub_topic: "polygon_limit" + enabled: True FootprintApproach: type: "polygon" action_type: "approach" @@ -456,12 +479,15 @@ Here is an example of configuration YAML for the Collision Monitor. simulation_time_step: 0.02 min_points: 6 # max_points: 5 for Humble visualize: False + enabled: True observation_sources: ["scan", "pointcloud"] scan: type: "scan" topic: "/scan" + enabled: True pointcloud: type: "pointcloud" topic: "/intel_realsense_r200_depth/points" min_height: 0.1 max_height: 0.5 + enabled: True diff --git a/migration/Iron.rst b/migration/Iron.rst index 925b1ddbb..f14a5bd90 100644 --- a/migration/Iron.rst +++ b/migration/Iron.rst @@ -84,6 +84,11 @@ New node in nav2_collision_monitor: Collision Detector In this `PR #3693 `_ A new node was introduced in the nav2_collision_monitor: Collision Detector. It works similarly to the Collision Monitor, but does not affect the robot's velocity. It will only inform that data from the configured sources has been detected within the configured polygons via message to the ``collision_detector_state`` topic that might be used by any external module (e.g. switching LED or sound alarm in case of collision). +Dynamic enabling/disabling of sources/polygons in Collision Monitor/Detector +**************************************************************************** + +In this `PR #3825 `_ we added the ability to dynamically enable/disable sources and polygons in the Collision Monitor/Detector. + Expose action server's result timeout ************************************* From c140f78738ed0f41221819a4c7c97444fb706386 Mon Sep 17 00:00:00 2001 From: Tony Najjar Date: Mon, 16 Oct 2023 11:00:13 +0200 Subject: [PATCH 2/7] Add docs for PR 3879 --- .../configuring-collision-detector-node.rst | 11 +++++++++++ .../configuring-collision-monitor-node.rst | 12 +++++++++++- migration/Iron.rst | 7 ++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/configuration/packages/collision_monitor/configuring-collision-detector-node.rst b/configuration/packages/collision_monitor/configuring-collision-detector-node.rst index 3d9b1b18a..f619f2982 100644 --- a/configuration/packages/collision_monitor/configuring-collision-detector-node.rst +++ b/configuration/packages/collision_monitor/configuring-collision-detector-node.rst @@ -88,6 +88,17 @@ Parameters Description: Whether to correct source data towards to base frame movement, considering the difference between current time and latest source time. If enabled, produces more accurate sources positioning in the robot base frame, at the cost of slower performance. This will cause average delays for ``~1/(2*odom_rate)`` per each ``cmd_vel`` calculation cycle. However, disabling this option for better performance is not recommended for the fast moving robots, where during the typical rate of data sources, robot could move unacceptably far. Thus reasonable odometry rates are recommended (~100 hz). +:visualize_collision_points: + + ============== ============================= + Type Default + -------------- ----------------------------- + bool False + ============== ============================= + + Description: + Whether to publish the collision points that will be considered by the polygons. + :polygons: ============== ============================= diff --git a/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst b/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst index 86b2f0ddc..159a41f4f 100644 --- a/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst +++ b/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst @@ -160,6 +160,17 @@ Parameters Description: Timeout, after which zero-velocity ceases to be published. It could be used for other overrode systems outside Nav2 are trying to bring the robot out of a state close to a collision, or to allow a standing robot to go into sleep mode. +:visualize_collision_points: + + ============== ============================= + Type Default + -------------- ----------------------------- + bool False + ============== ============================= + + Description: + Whether to publish the collision points that will be considered by the polygons. + :polygons: ============== ============================= @@ -171,7 +182,6 @@ Parameters Description: List of zones (stop/slowdown/limit bounding boxes, footprint, approach circle, etc...). Causes an error, if not specialized. - :observation_sources: ============== ============================= diff --git a/migration/Iron.rst b/migration/Iron.rst index 72754a15d..022c9633a 100644 --- a/migration/Iron.rst +++ b/migration/Iron.rst @@ -117,4 +117,9 @@ The costmap activation fails when required transforms are not available *********************************************************************** In this `PR #3866 `_ the parameter ``initial_transform_timeout`` is added to the costmap. The activation of the costmap now fails, -if the transformation from the robot base frame to the global frame does not become available during this timeout. \ No newline at end of file +if the transformation from the robot base frame to the global frame does not become available during this timeout. + +New collision monitor/dector param for debugging purposes +********************************************************* + +In this `PR #3879 `_ The parameter ``visualize_collision_points`` to enable the publishing of the collision points that will be considered by the configured polygons \ No newline at end of file From 0a3ef75793ac569ae7fac37c71a032618c07da60 Mon Sep 17 00:00:00 2001 From: Tony Najjar Date: Mon, 16 Oct 2023 11:02:56 +0200 Subject: [PATCH 3/7] . --- migration/Iron.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/Iron.rst b/migration/Iron.rst index 022c9633a..27e471d2d 100644 --- a/migration/Iron.rst +++ b/migration/Iron.rst @@ -122,4 +122,4 @@ if the transformation from the robot base frame to the global frame does not bec New collision monitor/dector param for debugging purposes ********************************************************* -In this `PR #3879 `_ The parameter ``visualize_collision_points`` to enable the publishing of the collision points that will be considered by the configured polygons \ No newline at end of file +In this `PR #3879 `_ The parameter ``visualize_collision_points`` was added to collision monitor/detector to enable the publishing of the collision points that will be considered by the configured polygons \ No newline at end of file From 740e237a82e94809dfa9829a6d4aedd9e8ad7aa7 Mon Sep 17 00:00:00 2001 From: Tony Najjar Date: Tue, 17 Oct 2023 12:00:33 +0200 Subject: [PATCH 4/7] fix --- .../configuring-collision-monitor-node.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst b/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst index 159a41f4f..6f1fb5331 100644 --- a/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst +++ b/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst @@ -377,7 +377,7 @@ Observation sources parameters ============== ============================= Description: - Type of polygon shape. Could be ``scan``, ``pointcloud`` or ``range``. + Type of polygon shape. Could be ``scan``, ``pointcloud``, ``range`` or ``polygon``. :````.topic: @@ -423,6 +423,17 @@ Observation sources parameters Description: Angle increment (in radians) between nearby obstacle points at the range arc. Two outermost points from the field of view are not taken into account (they will always exist regardless of this value). Applicable for ``range`` type. +:````.sampling_distance: + + ============== ============================= + Type Default + -------------- ----------------------------- + double 0.1 + ============== ============================= + + Description: + Internally the polygon is sampled for collision detection. sampling_distance is the distance between sampled points of the polygon. Applicable for ``polygon`` type. + :````.enabled: ============== ============================= From bc3cdc21aa4e3ac22c72d04aed7192d3a2b34bcc Mon Sep 17 00:00:00 2001 From: Tony Najjar Date: Tue, 17 Oct 2023 12:31:35 +0200 Subject: [PATCH 5/7] . --- .../configuring-collision-detector-node.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/configuration/packages/collision_monitor/configuring-collision-detector-node.rst b/configuration/packages/collision_monitor/configuring-collision-detector-node.rst index f619f2982..f378b34f4 100644 --- a/configuration/packages/collision_monitor/configuring-collision-detector-node.rst +++ b/configuration/packages/collision_monitor/configuring-collision-detector-node.rst @@ -240,7 +240,7 @@ Observation sources parameters ============== ============================= Description: - Type of polygon shape. Could be ``scan``, ``pointcloud`` or ``range``. + Type of polygon shape. Could be ``scan``, ``pointcloud``, ``range`` or ``polygon``. :````.topic: @@ -286,6 +286,17 @@ Observation sources parameters Description: Angle increment (in radians) between nearby obstacle points at the range arc. Two outermost points from the field of view are not taken into account (they will always exist regardless of this value). Applicable for ``range`` type. +:````.sampling_distance: + + ============== ============================= + Type Default + -------------- ----------------------------- + double 0.1 + ============== ============================= + + Description: + Internally the polygon is sampled for collision detection. sampling_distance is the distance between sampled points of the polygon. Applicable for ``polygon`` type. + :````.enabled: ============== ============================= From 9b78bf3c9cd2ff9bdf1dd970f5acedc5fafdb3e3 Mon Sep 17 00:00:00 2001 From: Tony Najjar Date: Tue, 17 Oct 2023 12:52:58 +0200 Subject: [PATCH 6/7] . --- .../configuring-collision-detector-node.rst | 11 ----------- .../configuring-collision-monitor-node.rst | 11 ----------- migration/Iron.rst | 6 +++--- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/configuration/packages/collision_monitor/configuring-collision-detector-node.rst b/configuration/packages/collision_monitor/configuring-collision-detector-node.rst index f378b34f4..a2c5ce323 100644 --- a/configuration/packages/collision_monitor/configuring-collision-detector-node.rst +++ b/configuration/packages/collision_monitor/configuring-collision-detector-node.rst @@ -88,17 +88,6 @@ Parameters Description: Whether to correct source data towards to base frame movement, considering the difference between current time and latest source time. If enabled, produces more accurate sources positioning in the robot base frame, at the cost of slower performance. This will cause average delays for ``~1/(2*odom_rate)`` per each ``cmd_vel`` calculation cycle. However, disabling this option for better performance is not recommended for the fast moving robots, where during the typical rate of data sources, robot could move unacceptably far. Thus reasonable odometry rates are recommended (~100 hz). -:visualize_collision_points: - - ============== ============================= - Type Default - -------------- ----------------------------- - bool False - ============== ============================= - - Description: - Whether to publish the collision points that will be considered by the polygons. - :polygons: ============== ============================= diff --git a/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst b/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst index 6f1fb5331..65b9c18cd 100644 --- a/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst +++ b/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst @@ -160,17 +160,6 @@ Parameters Description: Timeout, after which zero-velocity ceases to be published. It could be used for other overrode systems outside Nav2 are trying to bring the robot out of a state close to a collision, or to allow a standing robot to go into sleep mode. -:visualize_collision_points: - - ============== ============================= - Type Default - -------------- ----------------------------- - bool False - ============== ============================= - - Description: - Whether to publish the collision points that will be considered by the polygons. - :polygons: ============== ============================= diff --git a/migration/Iron.rst b/migration/Iron.rst index 27e471d2d..395c89512 100644 --- a/migration/Iron.rst +++ b/migration/Iron.rst @@ -119,7 +119,7 @@ The costmap activation fails when required transforms are not available In this `PR #3866 `_ the parameter ``initial_transform_timeout`` is added to the costmap. The activation of the costmap now fails, if the transformation from the robot base frame to the global frame does not become available during this timeout. -New collision monitor/dector param for debugging purposes -********************************************************* +Publishing of considered collision points in collision monitor/detector param for debugging purposes +**************************************************************************************************** -In this `PR #3879 `_ The parameter ``visualize_collision_points`` was added to collision monitor/detector to enable the publishing of the collision points that will be considered by the configured polygons \ No newline at end of file +In this `PR #3879 `_ the publishing of the collision points that will be considered by the configured polygons was added \ No newline at end of file From 3093574c0dc5c55d880bfcba2abdecc1e32aa9f5 Mon Sep 17 00:00:00 2001 From: Tony Najjar Date: Tue, 17 Oct 2023 12:58:20 +0200 Subject: [PATCH 7/7] . --- migration/Iron.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/Iron.rst b/migration/Iron.rst index 395c89512..a0950d01a 100644 --- a/migration/Iron.rst +++ b/migration/Iron.rst @@ -119,7 +119,7 @@ The costmap activation fails when required transforms are not available In this `PR #3866 `_ the parameter ``initial_transform_timeout`` is added to the costmap. The activation of the costmap now fails, if the transformation from the robot base frame to the global frame does not become available during this timeout. -Publishing of considered collision points in collision monitor/detector param for debugging purposes -**************************************************************************************************** +Publishing of collision points in collision monitor/detector for debugging purposes +*********************************************************************************** In this `PR #3879 `_ the publishing of the collision points that will be considered by the configured polygons was added \ No newline at end of file