Ask Your Question
0

how to get rid of running bash command every time

asked 2018-03-07 09:01:55 -0600

Ibrahim_aerospace gravatar image

updated 2018-03-07 09:02:46 -0600

Respected members whenever i build a package, every time i need to run source ~/catkin_ws/devel/setup.bash command. is there anyway to solve it ? while installing ROS i used this command source /opt/ros/kinetic/setup.bash because in case of my friend he doesn't need to run everytime. he just did it in the beginning of ROS installation. Please help. Thanks in advance

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-03-07 11:49:43 -0600

Gayan Brahmanage gravatar image

Add following environment variables to your .bashrc file

source /opt/ros/kinetic/setup.bash

export ROS_PACKAGE_PATH=/home/user/catkin_ws:/opt/ros/kinetic/share:/opt/ros/kinetic/stacks

export ROS_WORKSPACE=/home/user/catkin_ws
edit flag offensive delete link more

Comments

1

Additionally we have an alias alias S='source ${HOME}/.bashrc' to quickly source after building new packages, very useful

Oscar Lima gravatar imageOscar Lima ( 2018-03-08 16:26:48 -0600 )edit
0

answered 2018-03-07 09:53:08 -0600

l4ncelot gravatar image

updated 2018-03-07 09:53:51 -0600

Add it to your .basrhc file in home directory with this command:

echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc"

Then source your .bashrc file with source ~/.bashrc or restart terminal.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-03-07 09:01:55 -0600

Seen: 55 times

Last updated: Mar 07 '18