ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Ros2 setting up

asked 2023-04-16 10:21:52 -0500

Nartmangnourt gravatar image

updated 2023-05-06 17:00:20 -0500

Hey ROS Community,

i downloaded this repository: https://github.com/ros-planning/navig...

Do you have an approach to change the planner or do you know where i can change it ? I guess there are more planner provided from the nav2 stack or do i have to create a planner by myself?

I would be grateful for any help Thank you very much in advance !

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-04-19 06:07:11 -0500

ljaniec gravatar image

updated 2023-04-19 06:10:31 -0500

Nav2 has awesome documentation with tutorials - check this "First-Time Robot Setup Guide", especially part with "Setting Up Navigation Plugins"

You can change the planners by changing plugins in the configuration YAML file.

Some other resources you can find useful:

edit flag offensive delete link more

Comments

Hey ljaniec,

first thank you for your answer. I really appreciate your help. I have another question and hope you could help me out. I looking for the smac_planner/src/smac_planner.cpp file. i downloaded the nav2 repository on github (foxy-devel). But i can't find the file : https://github.com/ros-planning/navig...

If i using sudo apt install, the package files are installed system-wide in the /opt/ros/foxy directory, but they are compiled binaries and do not contain source files such as smac_planner.cpp.

But i still want to access the smac_planner.cpp file

Any ideas how?:)

Nartmangnourt gravatar image Nartmangnourt  ( 2023-04-23 07:40:02 -0500 )edit
1

Yes, you have to set up a Nav2 workspace with the source code for packages and build & source them by yourself. Instructions are here: https://navigation.ros.org/build_inst...

"For Released Distribution" part, use foxy-devel, remember to source this workspace in the new terminal (e.g. by adding it to the ~/.bashrc) to have these packages available.

You can then check and modify this planner code to your needs.

ljaniec gravatar image ljaniec  ( 2023-04-23 08:47:06 -0500 )edit

I really appreciate your help. Thank you :)

I have another question. If i change something in the nav2 workspace, it will not change anything in the underlay /opt/ros/foxy right? The two installations are completely separate and distinct from each other?

Nartmangnourt gravatar image Nartmangnourt  ( 2023-04-23 12:31:49 -0500 )edit

You should remove the binary install (packages installed with sudo apt-get install ...) when you are going to use the source built ones

ljaniec gravatar image ljaniec  ( 2023-04-23 13:21:38 -0500 )edit

Thank you ljaniec.

Should i remove it with : sudo apt-get --purge remove ros-foxy-navigation2 ros-foxy-nav2-bringup

And are there any disadvantages to use the source build ones?:)

Nartmangnourt gravatar image Nartmangnourt  ( 2023-04-24 03:23:13 -0500 )edit
1

Yes, these commands seem OK to me. Some robotic systems have hardware limitations (memory, CPU etc if it's a standard small computer) and building everything would take too much time/is impossible - you want a binary version if possible to install on them. If you don't mind building these packages, they are even better - more fresh features from the repositories are available off-the-shelf, binaries have features only available from the last sync.

ljaniec gravatar image ljaniec  ( 2023-04-25 04:02:48 -0500 )edit

Because of your help i was able to learn a lot.

Thank you so much ;)

Nartmangnourt gravatar image Nartmangnourt  ( 2023-04-25 06:21:05 -0500 )edit

Hey ljaniec, sorry to bother you again but after I do colcon build I get this warning:

[0.563s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
    'nav2_map_server' is in: /home/truong/nav2_ws/install/nav2_map_server
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
    --allow-overriding nav2_map_server

This may be promoted to an error in a future ...
(more)
Nartmangnourt gravatar image Nartmangnourt  ( 2023-04-30 14:01:46 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-04-16 10:21:52 -0500

Seen: 271 times

Last updated: May 06 '23