ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

workon_ros: Improve your ROS workflow

Hello everyone,
Wanted to share this project that I have been working on and off for some time. It allows you to easily source ROS distros and ROS workspaces while working from anywhere on your system.
It saves you the time of navigating to the workspace or entering the complete path for the setup file while working on workspaces. This was inspired from the virtualenvwrapper package for python.

Just recently added bash completion and support for sourcing workspaces which makes it somewhat suitable for the workflow!
There are plans to add multiple paths support for workspaces as well as a deactivate_ros function as well.
GitHub link: GitHub - jasmeet0915/workon_ros: A shell script aimed at making it easier to work with multiple ROS distros and workspaces simultaneously inspired from virtualenvwrapper

Do give this a try and share your feedbacks and reviews!

example

5 Likes

Great job !!! :+1: :+1: :+1:

1 Like

Definitely looks like a handy, user-friendly tool. Out of curiosity, if you call workon_ros twice with two different workspaces, will you end up with the environment variables of both, or just the latter?

3 Likes

Looks great! Coincidentally, I put together a very similar tool for myself that I’ve integrated into my workflow: I think I encountered the same problem you saw, where I found I had multiple projects I was working on at the same time and found swapping between them to be a pain. I’ll have to give your approach a try!

1 Like

Hi @shonigmann really glad you liked it!
As of now there is no functionality in the script that ‘unsets’ the environment which is currently set so if you run workon_ros twice you will end up with the environment variables of both.
Also it kind of messes up the prompt but this might be an easy fix with just a check to see if any workspace is already sourced.
There are plans to add a deactivate_ros function as well that might help with this.

@cst0 Thank you! Would love to see your implementation too, do share any links if available!
Do give this one a try and share your views!

1 Like