Error during launching turtlebot3_world.launch

asked 2019-07-21 15:39:50 -0600

vivek@61 gravatar image

updated 2019-07-22 01:49:23 -0600

mgruhler gravatar image

whenever i tries to launch the turtlebot3_world.launch file it showing the following error

RLException: Invalid <arg> tag: environment variable 'TURTLEBOT3_MODEL' is not set. 

Arg xml is **arg default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]" name="model"/>**

The traceback for the exception was written to the log file
edit retag flag offensive close merge delete



This seems to require you to set an environment variable, called TURTLEBOT3_MODEL to one of the types burger, waffle or waffle_pi.

Have you done that?

mgruhler gravatar image mgruhler  ( 2019-07-22 01:50:08 -0600 )edit

Can i know how to set environment variable?I am a newbie in Ubuntu

Wong gravatar image Wong  ( 2019-12-29 20:23:48 -0600 )edit

echo $MY_ENVIRONMENT_VARIABLE shows the content, which could also be empty, printenv prints all environment variables. so printenv | grep MY_ENVIRONMENT_VARIABLE would show you yours.

mgruhler gravatar image mgruhler  ( 2020-01-07 02:26:57 -0600 )edit

I'm having the same issue. I set the environment variable TURTLEBOT3_MODEL using the command TURTLEBOT3_MODEL=burger; echo $TURTLEBOT3_MODEL . It echos back burger, so I know it gets set. However, I then launch turtlebot3 using roslaunch turtlebot3_gazebo turtlebot3_world.launch and I get the same exact error as earlier, still telling me I don't have TURTLEBOT3_MODEL set, even though I just set it. I carefully checked spelling as well to ensure it wasn't a typo.

BesterJester gravatar image BesterJester  ( 2020-07-03 10:08:51 -0600 )edit

Got it to work, but not sure why. It fails if I set the environment variable using TURTLEBOT3_MODEL=burger, as I did above. However, if I instead set it using export TURTLEBOT3_MODEL=burger as explained here, it will work. Does anyone know why?

BesterJester gravatar image BesterJester  ( 2020-07-03 10:21:34 -0600 )edit

@BesterJester, without export, the env is only set for the current shell, but not for programs run from that shell.

see e.g.

mgruhler gravatar image mgruhler  ( 2020-07-06 05:39:15 -0600 )edit