0
$\begingroup$

Rosanswers logo

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!

Cheers,

Derek


Originally posted by derekboase on ROS Answers with karma: 3 on 2022-02-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Originally posted by bribri123 with karma: 36 on 2022-02-11

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by derekboase on 2022-02-11:
Absolutely right, worked brilliantly. Thank you!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.