.bashrc edits for sourcing ROS overlays removed, now located in bashrc_overlay.bash only

This commit is contained in:
winterhalderp 2021-04-19 16:39:00 +02:00
parent 313b3ea8df
commit c8caf162ad

View File

@ -45,61 +45,6 @@ colcon build
# Configure .bashrc:
# The the following in between "#----" to the end of your .bashrc script
#----------------------------------------------------------------------
# ROS 2 SETUP
echo "ROS 2 Setup:"
# Source Underlay
cmd="/opt/ros/foxy/setup.bash"
source $cmd
echo "ROS Underlay: "$cmd
# Source Overlay
# Change to the path of your workspace's "install/local_setup.bash" file
cmd="$HOME/colcon_ws/install/local_setup.bash"
source $cmd
echo "ROS Overlay: "$cmd
# You can add other workspaces
#cmd="$HOME/colcon_libs/install/local_setup.bash"
#source $cmd
#echo "ROS Overlay: "$cmd
echo "******************************************************"
# ROS 2 Settings
# Print ROS Variables
#printenv | grep -i ROS
echo "ROS_VERSION: "$ROS_VERSION
echo "ROS_PYTHON_VERSION: "$ROS_PYTHON_VERSION
echo "ROS_DISTRO: "$ROS_DISTRO
export ROS_DOMAIN_ID=69
echo "ROS_DOMAIN_ID: "$ROS_DOMAIN_ID
echo "To change: sudo nano /opt/ros/foxy/setup.bash"
echo "******************************************************"
echo "Topics active:"
ros2 topic list
echo "******************************************************"
printf "\n"
echo "If your package is not listed (ros2 pkg list):"
echo " * make sure you are sourcing the correct workspace: .bashrc"
echo " * delete build/, install/ and rebuild w/o errors"
# Parsing of git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\u@\h \[\e[32m\]\w \[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ "
#----------------------------------------------------------------------
# Install network tools
sudo apt install -y wireless-tools