ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

how to use roscd with folders which are not ros nodes ?

asked 2011-05-23 23:04:42 -0500

Guido gravatar image

Hi all,

I am currently using ROS in conjunction with Genom. However, Genom doesn't have an equivalent to roscd. I would like to know if there is a way to use roscd to fastly go into Genom module folders.


edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2011-05-23 23:07:09 -0500

Guido gravatar image

updated 2011-05-24 02:28:20 -0500


Just add a magical fake manifest.xml file to your folder. And be sure to put the name of your folder in the manifest at the right places (refere to an example manifest to see where the package name must appear).


edit flag offensive delete link more


So essentially, you are turning your folder into a ROS package. (What is a ROS package other than a folder with a manifest.xml in it?)
Martin Günther gravatar image Martin Günther  ( 2011-05-24 23:17:16 -0500 )edit
Yes indeed. You are disguising your folders into ros packages.
Guido gravatar image Guido  ( 2011-05-25 01:56:55 -0500 )edit

answered 2011-05-24 01:44:05 -0500

Daniel Stonier gravatar image

updated 2011-05-24 02:33:20 -0500

You don't need any arcane magic such as artificial manifests. They set up an environment variable for that which you can set in your See the ros wiki for environment variables, and in particular ROS_LOCATIONS for more details. e.g. in

export ROS_LOCATIONS="motors=/opt/diamondback/ycs/ycs_devices/motors"

After making sure the variable is set in my shell:

> snorri@snorriheim:/opt/diamondback$ roscd motors
> snorri@snorriheim:/opt/diamondback/ycs/ycs_devices/motors$ ls
actuator  goo  goo_firmware  qgoo

Those listed by ls are actual ros packages, but it works equally as well on any directory outside your ros tree.

edit flag offensive delete link more


Simply using ROS_LOCATION is not enough. I think roscd verify if the given name is indeed a package. So you do need arcane magic for this (if creating a file is what you call magic).
Guido gravatar image Guido  ( 2011-05-24 02:01:21 -0500 )edit
Seems to work for me without manifests. Are you sure you used ROS_LOCATIONS and not ROS_LOCATION? See edit above.
Daniel Stonier gravatar image Daniel Stonier  ( 2011-05-24 02:29:47 -0500 )edit
I tryied with and without S. But i didn't used name=... If you put it like this, it works. However, I prefere having files in my folders rather than a long ROS_LOCATIONS :). Anyway your solution is a good one. Thanks.
Guido gravatar image Guido  ( 2011-05-24 03:13:38 -0500 )edit

Question Tools


Asked: 2011-05-23 23:04:42 -0500

Seen: 381 times

Last updated: May 24 '11