ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.63k stars 1.31k forks source link

navigation_launch.py does not use params_file parameter #3970

Closed slowrunner closed 1 year ago

slowrunner commented 1 year ago

Bug report: navigation_launch.py does not use params_file passed on command line

Steps to reproduce issue

I want to lower some velocities by passing a local my_nav2_params.yaml file, which is a modified copy of /opt/ros/humble/share/nav2_bringup/params/nav2_params.yaml.

$ diff my_nav2_params.yaml /opt/ros/humble/share/nav2_bringup/params/nav2_params.yaml 
145,147c145
<       # changed for GoPiGo3
<       # max_vel_x: 0.26
<       max_vel_x: 0.1
---
>       max_vel_x: 0.26
151,153c149
<       # changed for GoPiGo3
<       # max_speed_xy: 0.26
<       max_speed_xy: 0.1
---
>       max_speed_xy: 0.26
346,351c342,343
<     # changed for GoPiGo3
<     # max_velocity: [0.26, 0.0, 1.0]
<     max_velocity: [0.1, 0.0, 1.0]
<     # changed for GoPiGo3
<     # min_velocity: [-0.26, 0.0, -1.0]
<     min_velocity: [-0.1, 0.0, -1.0]
---
>     max_velocity: [0.26, 0.0, 1.0]
>     min_velocity: [-0.26, 0.0, -1.0]

This does not do the trick as documented in the nav2 docs:

ros2 launch nav2_bringup navigation_launch.py params_file:=/home/ubuntu/HumbleDave/ros2ws/my_nav2_params.yaml

The docs suggest this is the correct command

Expected behavior

Actual behavior

Additional information

I do not want to edit the default nav2_params.yaml, nor put my_nav2_params.yaml in /opt/ros/humble/share... I want to use the my_nav2_params.yaml file in my ~/ros2ws/

SteveMacenski commented 1 year ago

I see you previously filed on robotics stack exchange. People do not crosspost.

slowrunner commented 1 year ago

I posted on robotics stack exchange when I thought it was my inexperience with the package. Then I found the exact command I was using in the nav2 package documentation, which led me to believe this is a defect, not my lack of knowledge, thus "People do not cross post", unless further evidence suggests this is the correct place for this issue. I have removed the post from stack.