Problem with kinect plugin

asked 2015-07-23 06:16:12 -0600

Alvaro Salcedo gravatar image

Hi Ros users:

I would like to add a kinect to P3DX model. I have added this plugin in a urdf.gazebo like this:

<!-- SENSOR KINECT-->
<gazebo reference="openni_camera_link">
    <sensor type="depth" name="openni_camera_camera">       
        <always_on>1</always_on>
        <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>100</far>
            </clip>
        </camera>
        <plugin name="camera_controller" filename="libgazebo_ros_openni_kinect.so">
            <alwaysOn>true</alwaysOn>
                <updateRate>10.0</updateRate>
                <cameraName>camera</cameraName>
                <frameName>openni_camera_link</frameName>                   
            <imageTopicName>rgb/image_raw</imageTopicName>
            <depthImageTopicName>depth/image_raw</depthImageTopicName>
            <pointCloudTopicName>depth/points</pointCloudTopicName>
            <cameraInfoTopicName>rgb/camera_info</cameraInfoTopicName>              
            <depthImageCameraInfoTopicName>depth/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>

It works fine because it does not errors. But when I run "rostopic list" the topics of camera like "rgb/image/raw..." does not appear...

What am I doing wrong?

Thanks!!!

edit retag flag offensive close merge delete

Comments

Have the same.

vovka gravatar image vovka  ( 2016-02-19 09:15:36 -0600 )edit

i am using gazebo 7 with ros indigo, and when i tried ur above code, it is working properly, i think u should use gazebo 7 instead of gazebo 2 provided by ros indigo.

dinesh gravatar image dinesh  ( 2016-09-23 15:59:09 -0600 )edit