navigation2_tutorials icon indicating copy to clipboard operation
navigation2_tutorials copied to clipboard

Nav2 Straight Line Plugin

Open aghari19 opened this issue 3 years ago • 2 comments

Hello, I downloaded ROS2 Galactic from source and Nav2 Galactic from source and am able to run the examples fine. I am trying to run the Nav2 StraightLine plugin following this tutorial and this repo.

However, when change the nav2_params.yaml file as per the instructions on the tutorial,linked above, the Gazeebo is not imported to Rviz and I am not able to set the robot initial position or goal for it to move.

I am using the nav2_params.yaml file as here and swapped the planner_server to planner_server: ros__parameters: planner_plugin_types: ["nav2_straightline_planner/StraightLine"] # For Eloquent and earlier planner_plugin_ids: ["GridBased"] # For Eloquent and earlier plugins: ["GridBased"] # For Foxy and later use_sim_time: True GridBased: plugin: nav2_straightline_planner/StraightLine # For Foxy and later interpolation_resolution: 0.1

Can someone let em know if I have the right .yaml file or how I can resolve this issue.

Thank you,

aghari19 avatar Oct 12 '21 14:10 aghari19

I would start with this file and change to the new plugin https://github.com/ros-planning/navigation2/blob/galactic/nav2_bringup/bringup/params/nav2_params.yaml here https://github.com/ros-planning/navigation2/blob/galactic/nav2_bringup/bringup/params/nav2_params.yaml#L285

Try that and then provide logs

SteveMacenski avatar Oct 12 '21 19:10 SteveMacenski

Hi!

I had the same issue, I wasn´t sourcing correctly the workspace after compiling, this is important to export the new plugin. These steps worked for me:

  1. cd <your_ws>
  2. colcon build --symlink-install
  3. source install/setup.bash
  4. ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False params_file:=/your/path/to/param_file.yaml

* The headless param to False is necessary if you want to visualize Gazebo.

I hope this would be useful!

P4B5 avatar May 03 '23 13:05 P4B5