Skip to content

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

Notifications You must be signed in to change notification settings

jasmeet0915/workon_ros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages