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

how to get rid of running bash command every time

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

Ibrahim_aerospace gravatar image

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

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 -0500

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 image Oscar Lima  ( 2018-03-08 16:26:48 -0500 )edit
0

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

l4ncelot gravatar image

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

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

Question Tools

1 follower

Stats

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

Seen: 123 times

Last updated: Mar 07 '18