Ask Your Question
4

Roslaunch and env variables

asked 2016-07-26 07:45:21 -0600

Mehdi. gravatar image

In my launch file I want to read the hostname from user input and when it is missing, it will use the local hostname by default. I use this line in my launch file

<arg name="hostname" default="$(env HOSTNAME)" />

When doing echo $HOSTNAME in the terminal, the value is set, however when I run roslaunch it complains that there is no HOSTNAME variable.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2016-07-26 08:05:32 -0600

Mehdi. gravatar image

HOSTNAME is a special environment variable that is not available for shell scripts. adding

export HOSTNAME

to my .bashrc fixed the problem.

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

3 followers

Stats

Asked: 2016-07-26 07:45:21 -0600

Seen: 1,147 times

Last updated: Jul 26 '16