Warped camera data from a new Gazebo/ROS install
Hello! I have a fresh Indigo install on 14.04 with Gazebo2 installed from debs:
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get -y install ros-indigo-gazebo-ros-pkgs
But I'm noticing some odd data from the camera sensor on a hector_quadrotor_demo. I've never run 2.X before and did not notice this in Gazebo 1.9, so I can't say if it's something that is directly related to 2.X or not.
Using (as per suggestion)
DISPLAY=:1 gazebo /usr/share/gazebo-2.2/worlds/camera.world
and then
gztopic view /gazebo/default/camera/link/camera/image
I see the following
When the same tool is used to view the image topic for the hector world though, a warped image is seen.
The world file for the hector world is below:
<?xml version="1.0" ?>
<sdf version="1.4">
<world name="default">
<scene>
<ambient>0.5 0.5 0.5 1</ambient>
<background>0.5 0.5 0.5 1</background>
<shadows>false</shadows>
</scene>
<physics type="ode">
<gravity>0 0 -9.8</gravity>
<ode>
<solver>
<type>quick</type>
<iters>10</iters>
<sor>1.3</sor>
</solver>
<constraints>
<cfm>0.0</cfm>
<erp>0.2</erp>
<contact_max_correcting_vel>100.0</contact_max_correcting_vel>
<contact_surface_layer>0.001</contact_surface_layer>
</constraints>
</ode>
<real_time_update_rate>1000</real_time_update_rate>
<max_step_size>0.001</max_step_size>
</physics>
<include>
<uri>model://ground_plane</uri>
</include>
<include>
<uri>model://willowgarage</uri>
</include>
<light type="directional" name="my_light">
<pose>0 0 30 0 0 0</pose>
<diffuse>.5 .5 .5 1</diffuse>
<specular>.1 .1 .1 1</specular>
<attenuation>
<range>200</range>
</attenuation>
<direction>0 0 -1</direction>
<cast_shadows>false</cast_shadows>
</light>
</world>
</sdf>
Asked by SL Remy on 2015-01-15 21:20:24 UTC
Answers
I assume the normal render window looks fine, correct?
Can you try something a bit easier?
- Run: gazebo worlds/camera.world
- When the GUI appears, press CTRL-t to open the topic visualizer.
- Select one of the camera image topics, should be /gazebo/defualt/camera/link/camera/image
- Does the image look correct? If so, try to fiddle with the environment (add objects, move the camera, etc) to see where it breaks.
Asked by nkoenig on 2015-01-16 10:13:06 UTC
Comments
Can you look in ~/.gazebo/ogre.log for any errors or exceptions? Can you also try disabling shadows (click on "Scene" in the "World" tab, then disable shadows in the property list)?
Asked by nkoenig on 2015-01-20 15:04:41 UTC
Compiler error: unknown error in hector_materials.material(4): token "shading" is not recognized Compiler error: unknown error in hector_materials.material(29): token "lighting" is not recognized Compiler error: unknown error in hector_materials.material(80): token "lighting" is not recognized Compiler error: unknown error in hector_materials.material(96): token "lighting" is not recognized
Asked by SL Remy on 2015-01-20 17:35:12 UTC
Looks like the shadows are already off in the world file though
Asked by SL Remy on 2015-01-20 18:40:19 UTC
If it's easy for you, I'd try using Gazebo4. I'll have to try this with gazebo2 to see if I can reproduce the problem.
Asked by nkoenig on 2015-01-21 13:43:14 UTC
I ran your world file in Gazebo4, and it looked fine. This only means that there is either a problem with Gazebo2, or there is something wrong with your particular setup (hardware, drivers, etc). I'll try gazebo2 next.
Asked by nkoenig on 2015-01-21 15:22:32 UTC
I will try Gazebo4 as well
Asked by SL Remy on 2015-01-22 22:53:21 UTC
Hasn't been as easy as I'd hoped. This is taking a while to iron out the installation steps for Gazebo4 and Indigo
Asked by SL Remy on 2015-01-26 14:40:40 UTC