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

setup.bash bad call with catkin_make_isolated

asked 2020-05-19 00:30:07 -0500

MCmobil gravatar image

updated 2020-05-19 01:56:40 -0500

gvdhoorn gravatar image

Hi ros org, I have experienced a bad issue with catkin_make_isolated. The file devel_isolated/setup.bash is not source by .bashrc.

For the background: I'm on Ubuntu 16.04, using ros kinetic. I had to reinstall Ubuntu few days ago (4 days but there was a weekend, so 2 days of use). I uninstall and reinstall completely ros. This is the content of the end of my bashrc file:

source /opt/ros/kinetic/setup.bash
#source ~/catkin_ws/devel/setup.bash
source ~/catkin_ws/devel_isolated/setup.bash
source ~/src/setup_px4.sh
source /opt/ros/kinetic/setup.bash

As a result, source this file does not have any effect on my workspace. I can't launch any package

Therefore no problem from my package, sourcing myself the workspace is working well.

I just run the command, on the workspace root, catkin_make_isolated, and no compilation error.

Does anyone has a way to fix it? And also maybe underline what I might have done wrongly?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-05-19 01:59:16 -0500

gvdhoorn gravatar image

This is the content of the end of my bashrc file:

source /opt/ros/kinetic/setup.bash
#source ~/catkin_ws/devel/setup.bash
source ~/catkin_ws/devel_isolated/setup.bash
source ~/src/setup_px4.sh
source /opt/ros/kinetic/setup.bash

these lines are executed in sequence, one after the other.

When you source /path/to/setup.bash, the last one wins (ie: overwrites all the others).

So with the sequence you show, first /opt/ros/kinetic/setup.bash is sourced, then ~/catkin_ws/devel_isolated/setup.bash, then ~/src/setup_px4.sh and finally again /opt/ros/kinetic/setup.bash.

End result: as if only /opt/ros/kinetic/setup.bash was sourced.

You'll typically want to source /path/to/your/workspace/devel/setup.bash last.

Or, alternatively, don't auto-source anything in your .bashrc, but manually source ~/catkin_ws/devel_isolated/setup.bash when you start a terminal.

edit flag offensive delete link more

Comments

I just found it right after! I really didn't know it, thank you for the fast answer!

PS: I set my answer as deleted, as this one was set before mine

MCmobil gravatar image MCmobil  ( 2020-05-19 02:04:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-05-19 00:30:07 -0500

Seen: 404 times

Last updated: May 19 '20