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

How to aviod running the command "source devel/setup.bash"

asked 2014-12-29 13:15:40 -0600

A.M Dynamics gravatar image

updated 2014-12-29 13:24:29 -0600

Hello All,

I've built a catkin package which has a main node and links against a repository. My problem is that everytime I need to use the package I have to run "source devel/setup.bash" before running the command 'rosrun'. Otherwise, I receive an error.Is there any way to solve this problem and avoid to run this command everytime?

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-12-29 13:32:30 -0600

updated 2014-12-29 13:37:32 -0600

If you add source ~/ROS_WS/devel/setup.bash to your bashrc it will automatically source it as soon as you open the terminal.

edit flag offensive delete link more

Comments

Thanks. My problem was solved.

A.M Dynamics gravatar image A.M Dynamics  ( 2014-12-29 13:36:28 -0600 )edit
1

Note: if you have multiple workspaces, adding a source .. line to your .bashrc is actually a pita.

gvdhoorn gravatar image gvdhoorn  ( 2014-12-29 15:42:31 -0600 )edit

@gvdhoorn. By a pita you mean is not good? if so, What do you suggest?

A.M Dynamics gravatar image A.M Dynamics  ( 2014-12-29 16:05:37 -0600 )edit

Yes, a 'pita' is not good :).

If you have multiple catkin workspaces (not multiple packages), you could perhaps do something with suitably configured terminals (ie: have each terminal source a different setup.bash). Then start the appropriate terminal. Personally, I just source my workspaces.

gvdhoorn gravatar image gvdhoorn  ( 2014-12-30 02:10:09 -0600 )edit

Thanks, I get it. So far I have edited bashrc file because sometimes things get complicated and I forget some details so by editing bash file I reduce the probability of receiving errors.

A.M Dynamics gravatar image A.M Dynamics  ( 2014-12-30 09:35:29 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-12-29 13:15:40 -0600

Seen: 2,134 times

Last updated: Dec 29 '14