ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to configure environment parameter TURTLEBOT_GAZEBO_WORLD_FILE

asked 2015-05-01 09:59:45 -0600

Haz88 gravatar image


I'm using gazebo 2.2.5 version with Ubuntu TRUSTY. I would like to launch the turtlebot_world.launch file in order to operate a turtlebot with the kobuki_keyop package in an empty world. While launching the file, I get this error: Invalid <arg> tag: environment variable 'TURTLEBOT_GAZEBO_WORLD_FILE' is not set.

Arg xml is <arg default="$(env TURTLEBOT_GAZEBO_WORLD_FILE)" name="world_file"/> The traceback for the exception was written to the log file

How can I set the TURTLEBOT_GAZEBO_WORLD_FILE parameter so that the command will work?

Seeking forward for ones help

edit retag flag offensive close merge delete


Have you installed ros-indigo-turtlebot-gazebo?

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-05-13 10:10:02 -0600 )edit

open a new terminal and than try. hope that may work.

abhay2302 gravatar image abhay2302  ( 2016-12-15 06:14:44 -0600 )edit

It did work after opening the terminal again. Maybe because the environment variable wasn't loaded.

jaskaranvirdi gravatar image jaskaranvirdi  ( 2017-04-04 02:22:53 -0600 )edit

4 Answers

Sort by » oldest newest most voted

answered 2016-07-28 21:41:33 -0600

Girts L gravatar image

It asks for a world file, so give it a world file. Something like

roslaunch turtlebot_gazebo turtlebot_world.launch world_file:=/opt/ros/indigo/share/turtlebot_gazebo/worlds/
edit flag offensive delete link more


This MAY work for now, but you should really stick to the way the package developers support. See the link in my answer.

130s gravatar image 130s  ( 2016-09-27 03:13:01 -0600 )edit

answered 2016-09-26 08:16:26 -0600

InderpreetSingh gravatar image

use the folowing command

rosmake turtlebot_gazebo

it will build the packages installed

edit flag offensive delete link more



Worked for me in kinetic:

export TURTLEBOT_GAZEBO_WORLD_FILE=/opt/ros/kinetic/share/turtlebot_gazebo/worlds/
roslaunch turtlebot_gazebo turtlebot_world.launch
danielsnider gravatar image danielsnider  ( 2017-04-23 07:12:29 -0600 )edit

answered 2015-09-01 12:18:02 -0600

130s gravatar image

Turtlebot utilizes environment variables that are set by env hook. See this tutorial.

edit flag offensive delete link more

answered 2018-08-02 18:02:11 -0600

lucasg gravatar image

I got the exact same error but I realized that it was because I had a $roscore running at the time that I was entering the roslaunch command. You should close all terminals if possible and then run the simulation in a new one.

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

1 follower


Asked: 2015-05-01 09:59:45 -0600

Seen: 18,491 times

Last updated: Apr 23 '17