Ask Your Question
2

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.

Guido

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

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

Guido gravatar image

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

Hi,

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).

Guido

edit flag offensive delete link more

Comments

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
5

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 setup.sh. See the ros wiki for environment variables, and in particular ROS_LOCATIONS for more details. e.g. in setup.sh:

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

Comments

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 287 times

Last updated: May 24 '11