Home | Tutorials | Wiki | Issues
Ask Your Question
0

kineckt is not available in my rostopic list!!!

asked 2013-10-12 10:29:01 -0600

Vahid gravatar image

Hi all,

I installed Ros hydro along with Gazebo package(1.9) for Ros in ubuntu 12.04, i run gazebo with this command

rosrun gazebo_ros gazebo

and i add sensors like Hokyuo and kineckt, i can't see the topic of them in rostopic list, i know that i should add plugin for them but at first i don't know the format and specified plugin for them and after that i am not sure about the place that i should add plugin, my mean is, should i add plugin tag in SDF file of this sensors or other place? please if it is possible write the complete plugin tag for these sensors especially kineckt, I tried many times but those don't work!!!!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-10-14 05:34:31 -0600

psei gravatar image

Hi, before you can see/access any topics for sensors in gazebo, you need to load the corresponding plugin.

I actually do not have an SDF-version, but my URDF file for the kinect looks like this. (I assume that you already have a link and a joint for the sensor, e.g. kinect)

<!-- SENSOR -->
<gazebo reference="openni_camera_link">
    <sensor type="depth" name="openni_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>
edit flag offensive delete link more

Comments

thank you so much my friend, it works ;) i have another question, as i know kinect returns us depth, ir data and image, now i have these topic, but there is just ir and depth topic, how can i get image of kinect? maybe i am wrong!

Vahid gravatar imageVahid ( 2013-10-14 09:16:10 -0600 )edit

With the configuration above you should see a "/camera/rgb/image_raw" topic. This is the RGB image. As far as I can see, the simulated kinect does not have an IR-Image topic (only depth).

psei gravatar imagepsei ( 2013-10-15 05:32:34 -0600 )edit

thank you man, it works.

Vahid gravatar imageVahid ( 2013-10-22 13:15:59 -0600 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2013-10-12 10:29:01 -0600

Seen: 1,241 times

Last updated: Oct 14 '13