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

Turtlebot simulator not working correctly

asked 2012-07-15 09:43:03 -0600

usamayaseen gravatar image

updated 2012-07-26 01:34:31 -0600

Hi !

I am using ROS Fuerte on my system running Ubuntu 12.04 . I installed turtlebot simulator using this command: sudo apt-get install ros-fuerte-turtlebot-simulator

Now on running turtlebot simulator, initially the gazebo window was not appearing, but i solved this issue by removing comments in the turtlebot_description/urdf/turtlebot_body.urdf.xacro as explained here , but after un-commenting that file when i run turtle bot simulator, the gazebo window appears but it closes after appearing for 2-3 seconds, and i get this output on terminal:

Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)
Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)
Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)
Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)
Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)
Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)
Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)
Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)
Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)
[1;^C33mWarning [RaySensor.cc:206] ranges not constructed yet (zero sized)
Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)

Any idea, how can i resolve this issue ?

Updated:

There is some issue with the gazebo i guess, only the empty world is loading properly (i.e its gui is visible), but no other world is opening, here is the output of the terminal:

roslaunch gazebo_worlds balcony_world.launch 
... logging to /home/usama/.ros/log/9c1e1d52-cff5-11e1-9cf2-74e50bbddf20/roslaunch-ubuntu-8563.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.

started roslaunch server http://ubuntu:43151/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /
gazebo (gazebo/gazebo)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute     '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7    /threading.pyc'> ignored
process[gazebo-1]: started with pid [8583]
Gazebo multi-robot simulator, version 1.0.2
Copyright (C) 2011 Nate Koenig, John Hsu, Andrew Howard, and contributors.
Released under the Apache 2 License.
http://gazebosim.org

Warning [parser.cc:332] Gazebo SDF has no gazebo element
Warning [parser.cc:243] parser for sdf version 1.0 failed, trying to parse as old deprecated format
Msg Waiting for master
Msg Connected to gazebo master @ http://localhost:11345
[ INFO] [1342518974.504510723]: waitForService: Service [/gazebo    /set_physics_properties] has not been advertised, waiting...
[ INFO] [1342518976.639042941, 0.126000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1342518976.683768376, 3.290000000]: Starting to spin physics dynamic reconfigure node...

There is a slightly different terminal output for another gazebo world:

usama@ubuntu:~$ roslaunch gazebo_worlds cups.launch 
... logging to /home/usama/.ros/log/afe47684-cff9-11e1-84d8-74e50bbddf20/roslaunch-ubuntu-10153.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.

started roslaunch server http://ubuntu:37584/

SUMMARY
========

PARAMETERS
 * /coffee_cup
 * /rosdistro
 * /rosversion
 * /wine

NODES
  /
  spawn_coffee_cup (gazebo/spawn_model)
  spawn_wine_cup (gazebo/spawn_model)

auto-starting new master
Exception AttributeError ...
(more)
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2012-07-18 05:53:32 -0600

treanorj gravatar image

updated 2012-07-27 02:43:04 -0600

Hi usama,

I was following your troubles myself and ran into this issue as well. If you add the following after the opening launch tag:

<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>

and then the following before the closing launch tag:

<group if="$(arg gui)">
    <node name="gazebo_gui pkg="gazebo" type="gui" respawn="false" output="screen"/>
</group>

You should get up and running. If you want to look into this in more detail, look into the gazebo_worlds stack and at the empty_world.launch file.

treanorj

UPDATE: Fixed mismatched quotation marks in <node ...="" &gt;<="" p="">

UPDATE 2: Below are my launch files to test this with. Note my package here is called turtlebot_sim_test, I am using a world file called box.world and I call roslaunch on basic_world.launch

basic_world.launch:

<launch>
    <arg name="use_sim_time" default="true"/>
    <arg name="gui" default="true"/>

    <!-- start gazebo with an empty plane -->
    <param name="/use_sim_time" value="true" />

    <node name="gazebo" pkg="gazebo" type="gazebo" args="-u $(find turtlebot_sim_test)/worlds/box.world" respawn="false" output="screen"/>

    <include file="$(find turtlebot_sim_test)/launch/robot.launch"/>

    <!-- start gui -->
    <group if="$(arg gui)">
        <node name="gazebo_gui" pkg="gazebo" type="gui" respawn="false" output="screen"/>
    </group> 

</launch>

robot.launch:

<launch>
    <param name="robot_description" command="$(find xacro)/xacro.py '$(find turtlebot_sim_description)/urdf/turtlebot.urdf.xacro'" />

    <node name="spawn_turtlebot_model" pkg="gazebo" type="spawn_model" args="$(optenv ROBOT_INITIAL_POSE) -unpause -urdf -param robot_description -model turtlebot" respawn="false" output="screen"/>

    <node pkg="diagnostic_aggregator" type="aggregator_node" name="diagnostic_aggregator" >
        <rosparam command="load" file="$(find turtlebot_bringup)/config/diagnostics.yaml" />
    </node>

    <node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher" output="screen">
        <param name="publish_frequency" type="double" value="30.0" />
    </node>

    <!-- The odometry estimator -->

    <node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
        <param name="freq" value="30.0"/>
        <param name="sensor_timeout" value="1.0"/>
        <param name="publish_tf" value="true"/>
        <param name="odom_used" value="true"/>
        <param name="imu_used" value="false"/>
        <param name="vo_used" value="false"/>
    </node>

    <!-- throttling -->
    <node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load pointcloud_to_laserscan/CloudThrottle openni_manager" respawn="true">
        <param name="max_rate" value="20.0"/>
        <remap from="cloud_in" to="/camera/depth/points"/>
        <remap from="cloud_out" to="cloud_throttled"/>
    </node>

    <!-- Fake Laser -->
    <node pkg="nodelet" type="nodelet" name="kinect_laser" args="load pointcloud_to_laserscan/CloudToScan openni_manager" respawn="true">
        <param name="output_frame_id" value="/camera_depth_frame"/>
        <!-- heights are in the (optical?) frame of the kinect -->
        <param name="min_height" value="-0.15"/>
        <param name="max_height" value="0.15"/>
        <remap from="cloud" to="/cloud_throttled"/>
    </node>

    <!-- Fake Laser (narrow one, for localization -->
    <node pkg="nodelet" type="nodelet" name="kinect_laser_narrow" args="load pointcloud_to_laserscan/CloudToScan openni_manager" respawn="true">
        <param name="output_frame_id" value="/camera_depth_frame"/>
        <!-- heights are in the (optical?) frame of the kinect -->
        <param name="min_height" value="-0.025"/>
        <param name="max_height" value="0.025"/>
        <remap from="cloud" to="/cloud_throttled"/>
        <remap from="scan" to="/narrow_scan"/>
    </node>


</launch>

UPDATE 4: If you haven't already done, it uncomment a section from the turtlebot_description/urdf/turtlebot_body.urdf.xacro file, below, as discussed in ROS Answers: Fuerte turtlebot simulator Ubuntu 12.04 precise

<inertial>
    <mass value="0.0001" />
    <origin xyz="0 0 0" />
    <inertia ixx="0 ...
(more)
edit flag offensive delete link more

Comments

Hi treanorj, i added this in the launch file and i got this error: "Invalid roslaunch XML syntax: not well-formed (invalid token): line 11, column 32", line 11, column 32 equals: "gazebo" type="gui" respawn="false" ......

usamayaseen gravatar image usamayaseen  ( 2012-07-19 08:14:46 -0600 )edit

Hi, sorry about that, I had misaligned quotation marks in <node> I have fixed this above. This should fix your issue, but if it does not can you post your entire launch file so we can have a look?

treanorj gravatar image treanorj  ( 2012-07-23 03:10:00 -0600 )edit

The solution doesn't work even after adding those lines, i have pasted the output of the terminal in the question as there is not enough space to paste the output here. Thanks Treanorj

usamayaseen gravatar image usamayaseen  ( 2012-07-24 19:10:23 -0600 )edit

Thanks for the terminal output, unfortunately I can't see why you are having a problem from that. Would you be able to post the actual .launch file for me that you are calling with roslaunch, hopefully I can see something from that. I have edited my answer above to include the launch files I used

treanorj gravatar image treanorj  ( 2012-07-25 02:57:41 -0600 )edit

Treanorj, see update 3, now i am thinking of re-installing ros :/

usamayaseen gravatar image usamayaseen  ( 2012-07-26 01:36:16 -0600 )edit

Hi usama, no need to reinstall, and sorry for the delayed response. You're problem should now be fixed by following what was done in this post http://answers.ros.org/question/38465/fuerte-turtlebot-simulator-ubuntu-1204-precise/ I'll put the details in the main answer above

treanorj gravatar image treanorj  ( 2012-07-27 02:38:06 -0600 )edit

Hi Treanorj, with the UPDATE 4, turtle bot is correctly displayed in the gazebo, Thanks alot man ! :D . Now there is only one issue, its giving this warning, Warning [RaySensor.cc:206] ranges not constructed yet (zero sized) . Any idea what its about ?

usamayaseen gravatar image usamayaseen  ( 2012-07-28 01:35:28 -0600 )edit
3

answered 2012-07-31 15:20:30 -0600

hsu gravatar image

updated 2012-07-31 19:38:25 -0600

to add to the discussion, the warning

Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)

has been addressed in trunk, a fix should be available with the next release (the sensors were not set active in the plugin).

edit flag offensive delete link more

Comments

This waring is connected to race condition in RaySensor.cc from gazebo. The ticked is issued in gazebo trunk on bitbucket.org. Simple one liner patch is clearing the situation. Just wait until it is included in the main sources.

Jakub gravatar image Jakub  ( 2012-08-04 01:01:00 -0600 )edit
1
hsu gravatar image hsu  ( 2012-08-04 09:09:56 -0600 )edit

I'm still having the same problems reported here. I just installed the last version of ROS Fuerte and I tried to follow turtlebot_simulator tutorials, but they are plenty of bugs and imprecisions. Someone knows how to avoid the Warning?

osandoval gravatar image osandoval  ( 2013-05-21 11:19:43 -0600 )edit
0

answered 2013-05-21 11:24:49 -0600

Someone knows hoy to avoid the Warning

Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)

in ROS fuerte?

I followed all the instructions I found but nothing works.

I just uncommented the turtlebot_body.urdf.xacro file, added the lines to the .launch files, (with some problems in last three added lines). I checked that patches are already applied, and I still get the warning message.

What can I do?

edit flag offensive delete link more

Comments

I'm waiting for an answer as well :(.

Zayin gravatar image Zayin  ( 2013-05-28 09:14:33 -0600 )edit

got this in indigo too.

neuronet gravatar image neuronet  ( 2016-08-15 18:57:00 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2012-07-15 09:43:03 -0600

Seen: 4,744 times

Last updated: May 21 '13