Ask Your Question

How to use configuration files for identical robots?

asked 2012-02-28 05:23:07 -0600

Chad Rockey gravatar image

I have a few configuration files containing calibrations, configurations, camera_infos for a set of identical robots.

Currently, the launch files will read in the computer's hostname as an environment variable so it knows to look in code repo/{$HOSTNAME}/config for that robot's parameters.

This works well enough for the runtime system, but then I'm not sure what's the best way to use those configurations when playing back bags recorded on those robots. Should I change the environment variable to be something like $ROBOT_HOSTNAME so that the system doesn't sometimes set it? This would allow the person to change the variable on their development machine before playing a bag from a specific robot. Is there something better I could do?

This question is related to my other question about recording configuration, but this one also has the runtime launch component.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-02-28 06:07:13 -0600

joq gravatar image

Environment variables are awkward. I like to avoid them, when I can.

How about collecting all the configuration data for each robot in a separate package? Store the relevant package name in a configuration file under /etc/ or ~. The per-user settings could even override the per-system one.

edit flag offensive delete link more

answered 2012-02-28 05:46:26 -0600

dornhege gravatar image

I'm not sure why, but I have still a export ROBOT=sim environment variable in my .bashrc. That would very likely be the one to set.

Unfortunately the ROS environment variables documentation does not list ROBOT. Maybe this is an un-/semiofficial convention?

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2012-02-28 05:23:07 -0600

Seen: 417 times

Last updated: Feb 28 '12