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

ENV variables ? /etc/environement ?

asked 2020-02-08 07:25:47 -0600

phil123456 gravatar image

updated 2020-02-08 08:57:54 -0600

Hello,

using, mellodic, just to setup things in a proper manner, where do I setup ROS variables for good?

I noticed my /etc/environement file was empty, so where do we setup ROS env variables ?

I checked them, there are 8 env variables defined so I guess, there must be some other place to set them ?

I checked setup.sh, but it's not in there

I could use ./bashrc, but it's not a boot setup, more like a terminal settings

details :

the idea is to set ROS_MASTER_URI on slave computers, I don't want these to be reset when I reboot them so, what's the best practice?

this tutorial only uses the (afaik volatile) EXPORT command : http://wiki.ros.org/ROS/Tutorials/Mul...

thanks

edit retag flag offensive close merge delete

Comments

Could you please describe what you really want to do (instead of a potential solution for a problem we don't know)? I ask because there are ways to start ROS nodes "at boot" for instance that would either take care of this, or don't need you to go messing with files in /etc.

It's not a good idea to "setup ROS variables for good", as they may need to change, which embedding them in some file external to managed ROS packages/contexts will make impossible.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-08 07:38:14 -0600 )edit

I updated my question

phil123456 gravatar image phil123456  ( 2020-02-08 08:57:05 -0600 )edit

so any idea?

phil123456 gravatar image phil123456  ( 2020-02-08 10:32:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-02-09 10:26:14 -0600

phil123456 gravatar image

updated 2020-02-09 10:26:34 -0600

it is obvious that .bashrc is too limited to have a constant setup after each reboot

especialy if you want an autonomous, auto initiating robot (who would'nt?)

options are (from different sources I gathered):

/etc/environment

/etc/hosts

please feel free to contradict me if you have better solutions

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-02-08 07:25:47 -0600

Seen: 134 times

Last updated: Feb 09 '20