Created
February 19, 2020 10:05
-
-
Save rfzeg/9ae35730e4c8a6bd82973372d6ef8595 to your computer and use it in GitHub Desktop.
Promt the user to source the ROS distro and catkin workspace in each new terminal window.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Allow for ROS source choice, paste this it in the user configuration file (.bashrc) | |
read -p "Do you want to source the ros_ws workspace in this new terminal window? (y/n): " input_choice | |
if [ "$input_choice" = "y" ] | |
then | |
echo "ROS sourced!" | |
# Source the distro specific setup file | |
source /opt/ros/kinetic/setup.bash | |
# Change ROS editor to nano | |
export EDITOR='nano -w' | |
# Set up ROS ip | |
export ROS_IP=`echo $(hostname -I)` | |
######################################################################################## | |
# If you want to source your setup bash in your catkin workspace, uncomment the line below | |
source ~/catkin_ws/devel/setup.bash | |
######################################################################################## | |
# Add other ROS statements here or uncomment the relevant ones below | |
export GAZEBO_MODEL_PATH=~/catkin_ws/src/RoboND-Perception-Project/pr2_robot/models:$GAZEBO_MODEL_PATH | |
# export GAZEBO_MODEL_PATH=~/catkin_ws/src/sensor_stick/models | |
# export GAZEBO_MODEL_PATH=~/catkin_ws/src/RoboND-Kinematics-Project/kuka_arm/models | |
######################################################################################## | |
break | |
elif [ "$input_choice" = "n" ] | |
then | |
echo "ROS *NOT* sourced!" | |
# Setup conda | |
export PATH="/home/robond/miniconda3/bin:$PATH" | |
break | |
else | |
echo "Warning: Not an acceptable option. Choose (y/n). | |
" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment