Ask Your Question

Setting environment variable 'TURTLEBOT_STAGE_MAP_FILE'

asked 2015-07-23 19:49:22 -0500

ymn93 gravatar image

I'm trying to get the turtlebot stage simulator running from these instructions:

But, putting the first line in the terminal:

roslaunch turtlebot_stage turtlebot_in_stage.launch

gives this output:

... logging to /home/yaseen-14/.ros/log/0b120c28-319b-11e5-ac3b-685d4316eccf/roslaunch-yaseen14-HP-Pavilion-m6-Notebook-PC-11910.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

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

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

Not sure why this is happening but would appreciate if anyone could help me out. Cheers!

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2015-08-31 05:03:53 -0500

Joelf gravatar image

updated 2015-08-31 08:25:40 -0500

I had this problem too, the next tutorial teaching you how to customise turtlebot_stage gives you some clues but when I tried to set the world and map files via the command line it still failed. Setting the environment variables in the terminal did work though.

(note: this may not be the best method, but it works and won't hurt anything)

You will find the required files in the turtlebot_stage directory, copy the map files to your home directory (you need to copy them to your home directory for permission reasons). Note that your path may differ from mine e.g. I'm using ROS Indigo.

Copy this directory /opt/ros/indigo/share/turtlebot_stage/maps/ to something like ~/stageTurorial/maps/

Then set some environment variables from your terminal

export TURTLEBOT_STAGE_WORLD_FILE="~/stageTutorial/maps/stage/"
export TURTLEBOT_STAGE_MAP_FILE="~/stageTutorial/maps/maze.yaml"

Now launching turtlebot_stage should work

roslaunch turtlebot_stage turtlebot_in_stage.launch
edit flag offensive delete link more


this works for indigo on osx

jacksonkr_ gravatar image jacksonkr_  ( 2016-02-13 07:40:48 -0500 )edit

for kinetic too, thanks a lot.

export TURTLEBOT_STAGE_WORLD_FILE="/opt/ros/kinetic/share/turtlebot_stage/maps/stage/"

export TURTLEBOT_STAGE_MAP_FILE="/opt/ros/kinetic/share/turtlebot_stage/maps/maze.yaml"

roslaunch turtlebot_stage turtlebot_in_stage.launch

worked for me.

necip gravatar image necip  ( 2020-02-22 00:27:00 -0500 )edit

answered 2016-02-20 20:49:56 -0500

Shouren Wu gravatar image

[Note : I use ROS Indigo,Ubuntu 14.04] I had this problem too. I had tried Joelf's answer in my Indigo but the error info still exists which always said that it can not find the "" and "maze.yaml" even if I had put them into right directory.Thanks a lot for Joelf's answer which has inspired me.

I found an easier way that may help. Just look at this directory:


(Open the contents of the file system and you will found this folder)

You will find several map files including "maze.yaml" and a folder: "stage", in which there are 3 files including "".(Sorry but there must be something wrong with my image uploader)

Then set environment variables in terminal:

export TURTLEBOT_STAGE_WORLD_FILE="/opt/ros/indigo/share/turtlebot_stage/maps/stage/"
export TURTLEBOT_STAGE_MAP_FILE="/opt/ros/indigo/share/turtlebot_stage/maps/maze.yaml"

Then launch:

roslaunch turtlebot_stage turtlebot_in_stage.launch

Note: If there are still some errors, remember to update your source list and use sudo apt-get update,then install the package sudo apt-get install ros-indigo-turtlebot-rviz-launchers,just guarantee your packages are the newest. By the way, I had used Ubuntu 12 before but there are something wrong with the source list even after sudo update, I can not run the turtlebot, the same error. After I update to Ubuntu 14.04, everything is OK.

edit flag offensive delete link more


worked fine for ROS kinetic

karthik valliappan gravatar image karthik valliappan  ( 2019-08-09 23:03:15 -0500 )edit

Note:just change the version of ROS depending on what you are using

Anchellon gravatar image Anchellon  ( 2019-09-04 00:03:30 -0500 )edit

answered 2016-01-23 18:38:31 -0500

anas ibrahim gravatar image

i had the same problem, but i installed this package and everything worked after

 sudo apt-get install ros-indigo-turtlebot-rviz-launchers
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: 2015-07-23 19:49:22 -0500

Seen: 6,942 times

Last updated: Aug 31 '15