No topic from depth camera in Gazebo

asked 2017-05-04 03:23:31 -0600

zubair gravatar image

updated 2017-05-18 07:11:46 -0600

130s gravatar image

hi guys i am trying to attach a fake camera on my robot in gazebo, i have have complete my urdf file with the instruction from this link http://gazebosim.org/tutorials?tut=ro... . though i am encountering with no errorsi am not able to see my fake camera in my topic list . below is my code for camera (in urdf).

<gazebo reference="realsense_link">
<plugin name="depth_controller" filename="libgazebo_ros_openni_kinect.so">
    <baseline>0.2</baseline>
    <alwaysOn>true</alwaysOn>
    <updateRate>1.0</updateRate>
    <cameraName>camera</cameraName>
    <imageTopicName>/camera/rgb/image_rect_color</imageTopicName>
    <cameraInfoTopicName>/camera/color/camera_info</cameraInfoTopicName>
    <depthImageTopicName>/camera/depth/image</depthImageTopicName>
    <depthImageInfoTopicName>/camera/depth/camera_info</depthImageInfoTopicName>
    <pointCloudTopicName>/camera/depth_registered/points</pointCloudTopicName>
    <frameName>camera_link</frameName>
    <pointCloudCutoff>0.5</pointCloudCutoff>
    <distortionK1>0.00000001</distortionK1>
    <distortionK2>0.00000001</distortionK2>
    <distortionK3>0.00000001</distortionK3>
    <distortionT1>0.00000001</distortionT1>
    <distortionT2>0.00000001</distortionT2>
    <CxPrime>0</CxPrime>
    <Cx>0</Cx>
    <Cy>0</Cy>
    <focalLength>0</focalLength>
    <hackBaseline>0</hackBaseline>
  </plugin>
</gazebo>


 <link name="realsense_link">
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="${realsense_link} ${realsense_link} ${realsense_link}"/>
</geometry>
</collision>
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="${realsense_link} ${realsense_link} ${realsense_link}"/>
</geometry>
<material name="red"/>
</visual>
<inertial>
<mass value="1e-5" />
<origin xyz="0 0 0" rpy="0 0 0"/>
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>
</link>
<joint name="realsense_joint" type="fixed">
<axis xyz="0 1 0" />
<origin xyz="${realsense_link} 0 .5" rpy="0 0 0"/>
<parent link="base_link"/>
<child link="realsense_link"/>
</joint>

can someone help ?

thanks ya all !!

edit retag flag offensive close merge delete

Comments

note the second code is from different urdf .. but this is how i am initializing my fake camera --

zubair gravatar imagezubair ( 2017-05-04 03:26:06 -0600 )edit

You might find this helpful https://github.com/PR2/pr2_common/blo...

angeltop gravatar imageangeltop ( 2017-05-18 06:56:20 -0600 )edit

1) Better post the entire urdf/xacro if possible. 2) Better indent your code properly...too hard to read if indentation is corrupted. 3) Not sure but move <gazebo> portion below the <link></link>?

130s gravatar image130s ( 2017-05-18 07:14:35 -0600 )edit