ros-navigation / navigation2_tutorials

Tutorial code referenced in https://docs.nav2.org/
184 stars 124 forks source link

Nav2 Straight Line Plugin #38

Open aghari19 opened 2 years ago

aghari19 commented 2 years ago

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,

SteveMacenski commented 2 years ago

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

P4B5 commented 1 year ago

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!