diff --git a/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst b/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst index 340f36678..52aa5786e 100644 --- a/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst +++ b/configuration/packages/collision_monitor/configuring-collision-monitor-node.rst @@ -457,7 +457,10 @@ All previous Polygon parameters apply, in addition to the following unique param ============== ============================= Description: - Minimum linear velocity for the sub polygon. In holonomic mode, this is the minimum resultant velocity. Causes an error, if not specified. + Minimum linear velocity for the sub-polygon. Causes an error, if not specified. + + * **Non-holonomic:** This is the minimum signed velocity along the x-axis (allows negative values for reverse motion). + * **Holonomic:** This is the minimum magnitude of the resultant velocity, which must be ``>= 0.0``. :``.``.linear_max: @@ -468,7 +471,10 @@ All previous Polygon parameters apply, in addition to the following unique param ============== ============================= Description: - Maximum linear velocity for the sub polygon. In holonomic mode, this is the maximum resultant velocity. Causes an error, if not specified. + Maximum linear velocity for the sub polygon. Causes an error, if not specified. + + * **Non-holonomic:** This is the maximum signed velocity along the x-axis. (allows negative values for reverse motion). + * **Holonomic:** This is the maximum magnitude of the resultant velocity, which must be ``>= 0.0``. :``.``.theta_min: @@ -501,7 +507,7 @@ All previous Polygon parameters apply, in addition to the following unique param ============== ============================= Description: - Start angle of the movement direction(for holomic robot only). Refer to the `Example`_ section for the common configurations. Applicable for `holonomic` mode only. + Start angle of the movement direction(for holonomic robot only). Refer to the `Example`_ section for the common configurations. Applicable for `holonomic` mode only. :``.``.direction_end_angle: @@ -512,7 +518,7 @@ All previous Polygon parameters apply, in addition to the following unique param ============== ============================= Description: - End angle of the movement direction(for holomic robot only). Refer to the `Example`_ section for the common configurations. Applicable for `holonomic` mode only. + End angle of the movement direction(for holonomic robot only). Refer to the `Example`_ section for the common configurations. Applicable for `holonomic` mode only. Observation sources parameters ============================== diff --git a/tutorials/docs/using_collision_monitor.rst b/tutorials/docs/using_collision_monitor.rst index ea57f69b7..40e15d30e 100644 --- a/tutorials/docs/using_collision_monitor.rst +++ b/tutorials/docs/using_collision_monitor.rst @@ -177,7 +177,7 @@ Below is the example configuration using 4 sub-polygons to cover the full range **For holomic robots:** -For holomic robots, the ``holonomic`` property should be set to ``true``. In this scenario, the ``linear_min`` and ``linear_max`` parameters should cover the robot's resultant velocity limits, while the ``theta_min`` and ``theta_max`` parameters should cover the robot's angular velocity limits. Additionally, there will be 2 more parameters, ``direction_start_angle`` and ``direction_end_angle``, to specify the resultant velocity direction. The covered direction will always span from ``direction_start_angle`` to ``direction_end_angle`` in the **counter-clockwise** direction. +For holomic robots, the ``holonomic`` property should be set to ``true``. In this scenario, the ``linear_min`` and ``linear_max`` parameters should cover the magnitude of the robot’s resultant velocity limits (using only non-negative values), while the ``theta_min`` and ``theta_max`` parameters should cover the robot's angular velocity limits. Additionally, there will be 2 more parameters, ``direction_start_angle`` and ``direction_end_angle``, to specify the resultant velocity direction. The covered direction will always span from ``direction_start_angle`` to ``direction_end_angle`` in the **counter-clockwise** direction. .. image:: images/Collision_Monitor/holonomic_direction.png :width: 365px @@ -187,6 +187,118 @@ Below shows some common configurations for holonomic robots that cover multiple .. image:: images/Collision_Monitor/holonomic_examples.png :height: 2880px +.. code-block:: yaml + + collision_monitor: + ros__parameters: + base_frame_id: "base_footprint" + odom_frame_id: "odom" + cmd_vel_in_topic: "cmd_vel_smoothed" + cmd_vel_out_topic: "nav_vel" + state_topic: "collision_monitor_state" + transform_tolerance: 0.3 + source_timeout: 1.0 + base_shift_correction: True + stop_pub_timeout: 2.0 + holonomic: true # Set to true for holonomic robots + + polygons: ["VelocityPolygonSlow"] + + VelocityPolygonSlow: + type: "velocity_polygon" + action_type: "slowdown" + slowdown_ratio: 0.5 + holonomic: true + visualize: True + enabled: True + velocity_polygons: [ + "forward", "forward_left", "left", "backward_left", + "backward", "backward_right", "right", "forward_right", + "stopped" + ] + + forward: + points: "[[0.6, 0.4], [0.6, -0.4], [-0.3, -0.4], [-0.3, 0.4]]" + linear_min: 0.05 + linear_max: 1.0 + direction_start_angle: -0.785 # -0.25pi + direction_end_angle: 0.785 # 0.25pi + theta_min: -1.0 + theta_max: 1.0 + + forward_left: + points: "[[0.55, 0.55], [0.55, -0.3], [-0.3, -0.3], [-0.3, 0.55]]" + linear_min: 0.05 + linear_max: 1.0 + direction_start_angle: 0.0 # 0.0pi + direction_end_angle: 1.571 # 0.5pi + theta_min: -1.0 + theta_max: 1.0 + + left: + points: "[[0.4, 0.6], [0.4, -0.4], [-0.4, -0.4], [-0.4, 0.6]]" + linear_min: 0.05 + linear_max: 1.0 + direction_start_angle: 0.785 # 0.25pi + direction_end_angle: 2.356 # 0.75pi + theta_min: -1.0 + theta_max: 1.0 + + backward_left: + points: "[[0.3, 0.55], [0.3, -0.3], [-0.55, -0.3], [-0.55, 0.55]]" + linear_min: 0.05 + linear_max: 1.0 + direction_start_angle: -3.1415 # -pi + direction_end_angle: -1.571 # -0.5pi + theta_min: -1.0 + theta_max: 1.0 + + backward: + points: "[[0.3, 0.4], [0.3, -0.4], [-0.6, -0.4], [-0.6, 0.4]]" + linear_min: 0.05 + linear_max: 1.0 + direction_start_angle: 2.356 # 0.75pi + direction_end_angle: -2.356 # -0.75pi + theta_min: -1.0 + theta_max: 1.0 + + backward_right: + points: "[[0.3, 0.3], [0.3, -0.55], [-0.55, -0.55], [-0.55, 0.3]]" + linear_min: 0.05 + linear_max: 1.0 + direction_start_angle: 1.571 # 0.5pi + direction_end_angle: 3.1415 # pi + theta_min: -1.0 + theta_max: 1.0 + + right: + points: "[[0.4, 0.4], [0.4, -0.6], [-0.4, -0.6], [-0.4, 0.4]]" + linear_min: 0.05 + linear_max: 1.0 + direction_start_angle: -2.356 # -0.75pi + direction_end_angle: -0.785 # -0.25pi + theta_min: -1.0 + theta_max: 1.0 + + forward_right: + points: "[[0.55, 0.3], [0.55, -0.55], [-0.3, -0.55], [-0.3, 0.3]]" + linear_min: 0.05 + linear_max: 1.0 + direction_start_angle: -1.571 # -0.5pi + direction_end_angle: 0.0 # 0.0pi + theta_min: -1.0 + theta_max: 1.0 + + # Stopped + stopped: + points: "[[0.4, 0.4], [0.4, -0.4], [-0.4, -0.4], [-0.4, 0.4]]" + linear_min: 0.0 + linear_max: 0.05 + direction_start_angle: -3.1415 + direction_end_angle: 3.1415 + theta_min: -1.0 + theta_max: 1.0 + Preparing Nav2 stack ====================