0
$\begingroup$

Rosanswers logo

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: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[master]: started with pid [10169]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to afe47684-cff9-11e1-84d8-74e50bbddf20
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[rosout-1]: started with pid [10182]
started core service [/rosout]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[spawn_wine_cup-2]: started with pid [10185]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[spawn_coffee_cup-3]: started with pid [10186]
loading model xml from ros parameter
loading model xml from ros parameter

The gazebo interface never appears in both the cases.

I think my system specs are enough to run the gazebo (2.1 core i5, 6GB RAM, 1Gb Nvidia Graphic card (drivers are installed) ). Then what could be the issue ?

2nd Update:

usama@ubuntu:/opt/ros/fuerte/stacks/simulator_gazebo/gazebo_worlds/launch$     roslaunch gazebo_worlds simple_box.launch 
... logging to /home/usama/.ros/log/bc8332fc-d613-11e1-ab91-74e50bbddf20/roslaunch-ubuntu-3971.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:33926/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion
 * /simple_box

NODES
  /
gazebo_gui (gazebo/gui)
spawn_simple_box (gazebo/spawn_model)

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[spawn_simple_box-1]: started with pid [3991]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[gazebo_gui-2]: started with pid [3992]
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

Msg Waiting for master.loading model xml from ros parameter
................................................................................

And this waiting never ends.

Update 3:

Here are the launch files:

turtlebot_empty_world.launch

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

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

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

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

robot.launch

<launch>
  <param name="robot_description" command="$(find xacro)/xacro.py '$(find turtlebot_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>

roslaunch turtlebot_gazebo turtlebot_empty_world.launch 

Here's the terminal output:

Msg Waiting for master
Msg Connected to gazebo master @ http://localhost:11345
loading model xml from ros parameter
waiting for service spawn_urdf_model
gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T*     boost::shared_ptr<T>::operator->() const [with T = urdf::Inertial]: Assertion `px !=     0' failed.
Aborted (core dumped)
Service call failed: transport error completing service call: unable to receive data from sender, check sender's logs for details
[gazebo-2] process has died [pid 27368, exit code 134, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gazebo -u /opt/ros/fuerte/stacks/turtlebot_simulator/turtlebot_gazebo/worlds/empty.world __name:=gazebo __log:=/home/usama/.ros/log/99c15bde-d714-11e1-bf1f-74e50bbddf20/gazebo-2.log].
log file: /home/usama/.ros/log/99c15bde-d714-11e1-bf1f-74e50bbddf20/gazebo-2*.log

And here's the screen shot of gazebo, even turtlebot is not displayed.

image description

regards

usama


Originally posted by usamayaseen on ROS Answers with karma: 69 on 2012-07-15

Post score: 3

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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 ... >

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.0001" ixy="0.0" ixz="0.0"
         iyy="0.0001" iyz="0.0" 
         izz="0.0001" />
</inertial>

Originally posted by treanorj with karma: 36 on 2012-07-18

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by usamayaseen on 2012-07-19:
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" ......

Comment by treanorj on 2012-07-23:
Hi, sorry about that, I had misaligned quotation marks in 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?

Comment by usamayaseen on 2012-07-24:
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

Comment by treanorj on 2012-07-25:
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

Comment by usamayaseen on 2012-07-26:
Treanorj, see update 3, now i am thinking of re-installing ros :/

Comment by treanorj on 2012-07-27:
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

Comment by usamayaseen on 2012-07-28:
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 ?

$\endgroup$
0
$\begingroup$

Rosanswers logo

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).


Originally posted by hsu with karma: 5780 on 2012-07-31

This answer was NOT ACCEPTED on the original site

Post score: 3


Original comments

Comment by Jakub on 2012-08-04:
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.

Comment by hsu on 2012-08-04:
see http://kforge.ros.org/turtlebot/trac/ticket/146 for more details.

Comment by osandoval on 2013-05-21:
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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.