-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Bug report / Feature backport request
Required Info
- Operating System: Ubuntu 22.04.5 LTS
- Computer: AMD Ryzen 9 7940HS + RTX 4090
- ROS 2 Version: Humble Hawksbill (apt binaries)
- Nav2 Package Version:
ros-humble-nav2-behaviors 1.1.18-1jammy.20250915.224708 - DDS Implementation:
rmw_fastrtps_cpp
Steps to reproduce
- Install Nav2 from Humble apt binaries:
sudo apt update && sudo apt install -y \ ros-${ROS_DISTRO}-pcl-ros \ ros-${ROS_DISTRO}-navigation2 \ ros-${ROS_DISTRO}-nav2-bringup \ ros-${ROS_DISTRO}-nav2-costmap-2d \ ros-${ROS_DISTRO}-pointcloud-to-laserscan \ ros-${ROS_DISTRO}-rviz2 \ ros-${ROS_DISTRO}-tf2-tools \ ros-${ROS_DISTRO}-rqt-tf-tree \ ros-${ROS_DISTRO}-nav2-mppi-controller
- Use the provided navigation launch file (below) that loads the standard Nav2 stack and the attached YAML configuration.
- Trigger a spin action, for example via Behavior Tree XML or RViz:
<Spin target_yaw="3.14"/>
- Observe:
[behavior_server]: Collision Ahead - Exiting Spin [behavior_server]: spin failed
Expected behavior
It should be possible to disable collision checking for the nav2_behaviors::Spin plugin—via parameter or BT XML flag—so that rotation can proceed even if the local costmap reports nearby obstacles (e.g. tight spaces, simulation).
Actual behavior
- In the current Humble apt binary release,
nav2_msgs/action/Spin.actionlacks the fieldbool disable_collision_checks. - The plugin
nav2_behaviors/plugins/spin.cppdoes not expose any parameter or runtime flag to disable costmap-based collision checking. - Every spin attempt aborts as soon as the costmap footprint touches an obstacle, regardless of configuration.
Reproduction configuration
Launch file (excerpt):
nav2_stack_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(nav2_launch_file),
launch_arguments={
'use_sim_time': use_sim_time,
'autostart': 'true',
'params_file': nav2_config
}.items()
)Parameter file (relevant part):
behavior_server:
ros__parameters:
costmap_topic: local_costmap/costmap_raw
footprint_topic: local_costmap/published_footprint
cycle_frequency: 10.0
behavior_plugins: ["spin", "backup", "drive_on_heading", "assisted_teleop", "wait"]
spin:
plugin: "nav2_behaviors/Spin"
disable_collision_checks: true # ignored, no effectVerification of message definition
$ ros2 interface show nav2_msgs/action/Spin
float32 target_yaw
builtin_interfaces/Duration time_allowance
---
builtin_interfaces/Duration total_elapsed_time
---
float32 angular_distance_traveled
No disable_collision_checks field exists in the Humble binary interface.
Expected interface (newer Nav2)
The updated Nav2 source (post-2024) defines:
float32 target_yaw
duration time_allowance
bool disable_collision_checks
---
float32 angular_distance_traveled
---
int8 NONE=0
int8 TIMEOUT=1
int8 COLLISION_AHEAD=2
int8 TF_ERROR=3
int8 UNKNOWN=4
int8 result
string message
and includes in the plugin:
if (cmd_disable_collision_checks_) return true;Suggested resolution
Backport this change set to the Humble branch (and apt binaries):
- Add
bool disable_collision_checkstonav2_msgs/action/Spin.action. - Update
nav2_behaviors::Spinto respect that flag. - Ensure the field is exposed via BT XML attribute:
<Spin target_yaw="3.14" disable_collision_checks="true"/>
This restores feature parity with Rolling/Jazzy Nav2 and allows users to rotate freely when desired.
Additional notes
Full navigation configuration (controller, costmaps, AMCL, etc.) is provided in my Repository SAGE for reproducing the issue; environment uses standard slam_toolbox + Nav2 bringup stack with use_sim_time=true.