I recently upgraded to ROS Fuerte on Ubuntu 12.04 and am unable to load my old Gazebo camera files. I have an empty world spawned and running and then attempt to spawn my camera model in a launch file:
<launch>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<!-- set use_sim_time flag -->
<group if="$(arg use_sim_time)">
<param name="/use_sim_time" value="true" />
</group>
<!-- start empty world -->
<node name="empty_world_server" pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/empty_throttled.world" respawn="false" output="screen" />
<!-- start gui -->
<group if="$(arg gui)">
<node name="gazebo_gui" pkg="gazebo" type="gui" respawn="false" output="screen"/>
</group>
<node name="spawn_east_camera" pkg="gazebo" type="spawn_model" args="-file $(find rrl_simulation)/robots/test.urdf -urdf -x -2.5 -z 2.0 -P 0.87 -model east_camera" respawn="false" output="screen" />
The following is the URDF of the camera:
<?xml version="1.0"?>
<gazebo reference="east_camera">
<sensor:camera name="east_camera_sensor">
<imageSize>640 480</imageSize>
<imageFormat>R8G8B8</imageFormat>
<hfov>90</hfov>
<nearClip>0.01</nearClip>
<farClip>100</farClip>
<updateRate>30.0</updateRate>
<controller:gazebo_ros_camera name="east_camera_controller" plugin="libgazebo_ros_camera.so">
<alwaysOn>true</alwaysOn>
<updateRate>10.0</updateRate>
<imageTopicName>sim_east_camera/image_raw</imageTopicName>
<interface:camera name="east_camera_interface" />
</controller:gazebo_ros_camera>
</sensor:camera>
<turnGravityOff>true</turnGravityOff>
<material>Gazebo/Blue</material>
</gazebo>
Once I try and spawn in, the following errors are produced:
... logging to /home/rctoris/.ros/log/d7e20176-95f5-11e1-9b89-782bcbad8931/roslaunch-MAGLEV-26292.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://MAGLEV:51648/
SUMMARY
========
PARAMETERS
* /rosdistro
* /rosversion
* /use_sim_time
NODES
/
empty_world_server (gazebo/gazebo)
gazebo_gui (gazebo/gui)
spawn_east_camera (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 [26308]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to d7e20176-95f5-11e1-9b89-782bcbad8931
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 [26321]
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[empty_world_server-2]: started with pid [26335]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[gazebo_gui-3]: started with pid [26343]
Gazebo multi-robot simulator, version 1.0.1
Copyright (C) 2011 Nate Koenig, John Hsu, Andrew Howard, and contributors.
Released under the Apache 2 License.
http://gazebosim.org
Dbg pluginPaths and GAZEBO_PLUGIN_PATH doesn't exist.Set GAZEBO_PLUGIN_PATH to Ogre's installation path. ...or are you loading via SystemPlugins?
Gazebo multi-robot simulator, version 1.0.1
Copyright (C) 2011 Nate Koenig, John Hsu, Andrew Howard, and contributors.
Released under the Apache 2 License.
http://gazebosim.org
Dbg pluginPaths and GAZEBO_PLUGIN_PATH doesn't exist.Set GAZEBO_PLUGIN_PATH to Ogre's installation path. ...or are you loading via SystemPlugins?
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[spawn_east_camera-4]: started with pid [26352]
Msg Waiting for master.[ INFO] [1336141892.480896480]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
Msg Waiting for master
Msg Connected to gazebo master @ http://localhost:11345
loading model xml from file
waiting for service spawn_urdf_model
Msg Connected to gazebo master @ http://localhost:11345
Warning [parser.cc:330] Gazebo SDF has no gazebo element
Warning [parser.cc:269] parse as sdf version 1.0 failed, trying to parse as old deprecated format
Warning [parser.cc:275] parse as old deprecated world file failed, trying old model format.
Dbg Node[physical] Has empty key value[static]
Dbg Node[empty] Has empty key value[]
Dbg Node[camera] Has empty key value[alwaysOn]
Dbg skipping prefixed element [interface:camera] when copying plugins
spawn status: SpawnModel: successfully spawned model
Dbg Unable to find element with name[depth_camera] return empty
Error [CameraPlugin.cc:39] CameraPlugin requires a CameraSensor.
Msg It is a depth camera sensor
Segmentation fault (core dumped)
[empty_world_server-2] process has died [pid 26335, exit code 139, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gazebo /opt/ros/fuerte/stacks/simulator_gazebo/gazebo_worlds/worlds/empty_throttled.world __name:=empty_world_server __log:=/home/rctoris/.ros/log/d7e20176-95f5-11e1-9b89-782bcbad8931/empty_world_server-2.log].
log file: /home/rctoris/.ros/log/d7e20176-95f5-11e1-9b89-782bcbad8931/empty_world_server-2*.log
[spawn_east_camera-4] process has finished cleanly
log file: /home/rctoris/.ros/log/d7e20176-95f5-11e1-9b89-782bcbad8931/spawn_east_camera-4*.log
[gazebo_gui-3] process has finished cleanly
log file: /home/rctoris/.ros/log/d7e20176-95f5-11e1-9b89-782bcbad8931/gazebo_gui-3*.log
^C[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
The above used to work in Electric. Is there some change I missed that I should use to convert my camera sensor to be able to work in Fuerte?
Originally posted by rtoris288 on ROS Answers with karma: 1173 on 2012-05-04
Post score: 7
Original comments
Comment by MorganCormier on 2012-05-05:
I also have the same error ("Exception AttributeError: AttributeError") on several of my packages.
Hope this thread will solve our problem