All Projects → jasmeet0915 → workon_ros

jasmeet0915 / workon_ros

Licence: other
A shell script aimed at making it easier to work with multiple ROS distros and workspaces simultaneously inspired from virtualenvwrapper

Programming Languages

shell
77523 projects

WORKON_ROS

This tool was inspired by virtualenvwrapper which makes activating and managing virtual environments very easy.

This script allows you to source setup.bash files for different ros distros or workspaces in a similar way and also displays the name of the current activated distro+workspace in the command prompt in parenthesis (as shown in gif below).
It works with both ROS1 and ROS2 workspaces!

Note: The script assumes that you have installed all your ROS distros in default /opt/ros path

Usage Instructions

  • Add an environment variable named WORKON_ROS_HOME with the path containing workspaces to your .bashrc like this:
    export WORKON_ROS_HOME=$HOME/ros_workspaces

  • To source the workon_ros_script.sh shell script everytime you open a terminal, add the following to your .bashrc
    source /path/to/script/workon_ros_wrapper.sh

  • Source any distro or workspace using this command:
    workon_ros distro_name/workspace_name

TO DO:

  • Tab Completion
  • Add help function and -h option
  • Add zsh support
  • Add support for multiple WORKON_ROS_HOME paths.
  • deactive_ros function
  • Add --change-directory boolean option with workon_ros
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].