Camera sensor update rate very low
I have a camera sensor attached to a rover in my gazebo world. The output of the camera (photos) is saved to a location on my computer, and I convert the photos into a video. However, the framerate of the video is extremely poor (one frame maybe every five seconds). Anyone have any idea why this is? Code is attached below. Seems like some of it may be cutoff in the preview (physics part at the start), not sure why. I am new to Gazebo and did not write most of this code:
<?xml version="1.0"?>
<scene>
<sky>
<clouds>
<speed>12</speed>
</clouds>
</sky>
<ambient>0.4 0.4 0.4 1</ambient>
<background>0.25 0.25 0.25 1</background>
</scene>
<model name="ground_plane">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>5000 5000</size>
</plane>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
</ode>
</friction>
</surface>
</collision>
<visual name="runway">
<pose>000 0 0.005 0 0 0</pose>
<cast_shadows>false</cast_shadows>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>1829 45</size>
</plane>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Runway</name>
</script>
</material>
</visual>
<visual name="grass">
<pose>0 0 -0.1 0 0 0</pose>
<cast_shadows>false</cast_shadows>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>5000 5000</size>
</plane>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grass</name>
</script>
</material>
</visual>
</link>
</model>
<include>
<uri>model://sun</uri>
</include>
<light name='user_directional_light_0' type='directional'>
<pose>0 0 1 0 0 0</pose>
</light>
<model name="rover">
<include>
<uri>model://mars_rover</uri>
</include>
<link name='camera'>
<pose>0 0 0.55 1.57 0 1.57</pose>
<inertial>
<pose>0 0 0 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.001</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.001</iyy>
<iyz>0</iyz>
<izz>0.001</izz>
</inertia>
</inertial>
<visual name='visual'>
<pose>0 0 0 0 0 0</pose>
<geometry>
<cylinder>
<radius>0.025</radius>
<length>0.025</length>
</cylinder>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
<sensor name="camera" type="camera">
<pose>0 0 0 -1.57 -1.57 0</pose>
<camera>
<save enabled="true">
<path>/tmp/rover_videos</path>
</save>
<horizontal_fov>1.0472</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
</image>
<clip>
<near>0.05</near>
<far>1000</far>
</clip>
</camera>
<always_on>1</always_on>
<update_rate>30</update_rate>
<visualize>true</visualize>
</sensor>
</link>
</model>
Asked by chewy378 on 2023-05-27 02:23:35 UTC
Comments
There are a few points to check:
The world looks simple enough if you are running with a GPU.
Asked by Veerachart on 2023-05-30 20:23:28 UTC