A Bash tool for easily and dynamically sourcing ROS and ROS2 environment.
Download the repository to your local computer and run the setup script.
cd ~
git clone https://github.com/Briancbn/ros_src_tools.git .ros_src_tools
./.ros_src_tools/setup.sh
Follow the instructions to setup up your ros_src_tools
.
Note that by default, the program will search for
- ROS Installation inside
/opt/ros
- ROS workspaces (folder ends with _ws) in
~/
You can change these configurations during the setup.
You can run srcros -h
to show help information
usage: srcros [-h] [distro_name] [workspace_name]
Sourcing available ROS distro and ROS workspace.
srcros
Source Melodic setup.bash by default.
srcros [distro_name]
Source available distro name found in /opt/ros.
srcros [distron_name] [workspace_name]
Source available distro name found in /opt/ros
and then source the workspace name (ends with '_ws')
found in /home/<username>.
Workspace name don't need suffix.
srcros -h
show help information
Change to your latest sourced workspace location.
This location is defined automatically when you run srcros
Install the debian pre-release from my fork to enable autocomplete capability.
After installation simply use srcros
command again, the autocompletion for colcon_cd is also enabled.
This is equivalent to running the following command
rosdep install --from-paths src --ignore-src -y --rosdistro "${ROS_DISTRO}"
Simply delete the repository you have downloaded.
rm -rf ~/.ros_src_tools
Delete the following lines under ~.bashrc
# ROS source tools
if [ -f ~/ros_src_tools/.ros_shortcut_impl.sh ]; then
. ~/ros_src_tools/.ros_shortcut_impl.sh
fi