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

Running Turtlebot_gazebo error [closed]

asked 2016-10-10 08:23:06 -0500

Mina gravatar image

I'm trying to run turtlebot_gazebo but I have some problems. Here's the subject in details. I'm running ROS kinetic which is supposed that it can't link to gazebo as far as I know. I installed gazebo with the help of your site, however, the package I got and installed was called turtlebot_simulator, and turtlebot_gazebo was inside it (if I misunderstood the thing let me know). I tried to launch it using " $ roslaunch turtlebot_gazebo turtlebot_world.launch" but this didn't work. Finally, I browsed to folder "launch" inside turtlebot_gazebo and tried to launch it using "$ roslaunch turtlebot_world.launch" and it gives me the following 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 fix it? Thank you

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by 130s
close date 2017-09-15 11:52:51.201018

Comments

130s gravatar image 130s  ( 2017-09-15 11:53:04 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2017-03-03 05:20:53 -0500

Vash gravatar image

Try setting the variable TURTLEBOT_GAZEBO_WORLD_FILE:

export TURTLEBOT_GAZEBO_WORLD_FILE="/opt/ros/indigo/share/turtlebot_gazebo/worlds/playground.world"

edit flag offensive delete link more
0

answered 2016-10-10 09:17:42 -0500

gavran gravatar image

The error you got says that environment variable is not set - this means that this launch file expected that TURTLEBOT_GAZEBO_FILE would be set. (to check it, try echo $TURTLEBOT_GAZEBO_WORLD_FILE).

I suggest you to install turtlebot_gazebo package by running sudo apt-get install ros-kinetic-turtlebot-gazebo and then try to launch it as you did initially (roslaunch turtlebot_gazebo turtlebot_world)

edit flag offensive delete link more

Comments

I used your command and I installed it. The good point is that roslaunch turtlebot_gazebo turtlebot_world.launch worked, however, it gives same error! what does it mean "the file would be set"?

Mina gravatar image Mina  ( 2016-10-10 09:55:32 -0500 )edit

the variable would be set - I meant to say it would have some value. To be sure, can you open a new terminal and write echo $TURTLEBOT_GAZEBO_WORLD_FILE (ant tell what do you get as an output)

gavran gravatar image gavran  ( 2016-10-10 10:06:41 -0500 )edit
1

The problem was that I neither restarted the PC nor ROS in 3 days now, so even after I installed turtlebot_gazebo 1st time the changes weren't applied. Now I restarted it so it worked. Sorry for that. It looks really nice Do you have any idea how I can simulate drones same way? Thank you

Mina gravatar image Mina  ( 2016-10-10 10:37:20 -0500 )edit

no - but I suggest you to put this as separate question (maybe somebody knows who doesn't follow our discussion in comments) and mark this one as resolved.

gavran gravatar image gavran  ( 2016-10-10 11:26:54 -0500 )edit
1

In my case, the problem with TURTLEBOT_GAZEBO_WORLD_FILE fixed just by reboot my computer. But there are another problems. Fortunately there is a good solution in http://answers.ros.org/question/19940...

robbycandra gravatar image robbycandra  ( 2016-10-10 19:13:27 -0500 )edit

I guess rebooting a computer is an overkill, it would be enough to open a new terminal

gavran gravatar image gavran  ( 2016-10-11 03:14:37 -0500 )edit
0

answered 2017-04-18 07:16:38 -0500

updated 2017-04-18 07:18:52 -0500

try these , this worked for me

$ source /opt/ros/indigo/setup.bash

$ rosdep install --from-paths src -i -y

$catkin_make

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-10-10 08:23:06 -0500

Seen: 5,064 times

Last updated: Apr 18 '17