Skip to content

An easy dynamic environment sourcing tool for ROS1 and ROS2

License

Notifications You must be signed in to change notification settings

Briancbn/ros_src_tools

Repository files navigation

ROS Sourcing Tools

CI License

A Bash tool for easily and dynamically sourcing ROS and ROS2 environment.

Installation

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.

Usage

ros_src_tools_demo

srcros

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

roshome / colcon_cd

Change to your latest sourced workspace location.

This location is defined automatically when you run srcros

colcon_cd autocomplete setup

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.

rosdep_intstall_all

This is equivalent to running the following command

rosdep install --from-paths src --ignore-src -y --rosdistro "${ROS_DISTRO}"

Uninstall

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

About

An easy dynamic environment sourcing tool for ROS1 and ROS2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages