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

Is there a way for me to not have to build and source every time I open a new terminal

asked 2022-02-11 03:30:27 -0500

derekboase gravatar image

updated 2022-02-11 09:26:35 -0500

Hello all,

Thank you for your time and consideration!

I'm using ROS melodic on Ubuntu 18.04 distribution and every time I open a new terminal, or even a new tab on a terminal, I have to re-build and re-source my workspace ( "catkin build [package names]" and "source devel/setup.bash"). I used a docker image at university and I didn't have to do this. i'm wondering if there is something that I can do so that once I build my workspace once it's built in all terminals.

Please forgive any terminology misuse, I'm fairly new to ROS and welcome any feedback!



edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-02-11 09:42:32 -0500

bribri123 gravatar image

updated 2022-02-11 09:47:07 -0500

just run these commands here in your home directory and they should allow you to not have to retype this command source devel/setup.bash, but remember you will have to run your launch files and packages in your home directory to have effect but i'm not sure you have to type catkin build every time maybe just catkin_make once when there is a new package in your_ws I would also recommend checking out the ROS wiki

echo "source <your_ws>/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
edit flag offensive delete link more


Absolutely right, worked brilliantly. Thank you!

derekboase gravatar image derekboase  ( 2022-02-11 12:08:21 -0500 )edit

Question Tools

1 follower


Asked: 2022-02-11 03:30:27 -0500

Seen: 95 times

Last updated: Feb 11 '22