How to speedup the gazebo ros openni kinect plugin rate

asked 2015-04-05 22:04:53 -0600

AReimann gravatar image

updated 2015-04-05 22:19:43 -0600

Hello,

I'm simulating a differential drive robot with a Kinect using the gazebo ros openni kinect plugin. The publishing rate I get (with rostopic hz) for the Kinect point cloud is only at around 22 Hz. This is even after slowing down the physics update rate to 100 Hz.

When I slow down the physics update rate further down, e. g. 50 Hz I get the desired 30 Hz. But I think this might lead to some other problems, as it seems rather low.

Is the plugin in general slow and is there a way / parameter to speed it up?

I'm working on a Intel i5 760 @ 2.8 Ghz with a nvidia GTX 650 Ti, not the most powerfull rig but should be okish?

Plugin settings:

<gazebo reference="${link_name}">
    <sensor type="depth" name="${camera_name}">       
        <always_on>1</always_on>
        <update_rate>30.0</update_rate>
        <visualize>true</visualize>             
        <camera>
            <horizontal_fov>1.047</horizontal_fov>  
            <image>
                <width>640</width>
                <height>480</height>
                <format>R8G8B8</format>
            </image>
            <depth_camera>

            </depth_camera>
            <clip>
                <near>0.1</near>
                <far>4</far>
            </clip>
        </camera>
        <plugin name="${camera_name}_controller" filename="libgazebo_ros_openni_kinect.so">
            <alwaysOn>true</alwaysOn>
            <updateRate>30.0</updateRate>
            <cameraName>${robot_topic_prefix}/${camera_name}</cameraName>
            <frameName>${frame_name}</frameName>                   
            <imageTopicName>rgb/image_raw</imageTopicName>
            <depthImageTopicName>depth_capture/image_raw</depthImageTopicName>
            <pointCloudTopicName>depth_capture/points</pointCloudTopicName>
            <cameraInfoTopicName>rgb/camera_info</cameraInfoTopicName>              
            <depthImageCameraInfoTopicName>depth_capture/camera_info</depthImageCameraInfoTopicName>            
            <pointCloudCutoff>0.4</pointCloudCutoff>                
                <hackBaseline>0.07</hackBaseline>
                <distortionK1>0.0</distortionK1>
                <distortionK2>0.0</distortionK2>
                <distortionK3>0.0</distortionK3>
                <distortionT1>0.0</distortionT1>
                <distortionT2>0.0</distortionT2>
            <CxPrime>0.0</CxPrime>
            <Cx>0.0</Cx>
            <Cy>0.0</Cy>
            <focalLength>0.0</focalLength>
            </plugin>
    </sensor>
</gazebo>
edit retag flag offensive close merge delete