Gazebo | Ignition | Community
Ask Your Question

Hielke's profile - activity

2019-06-02 20:33:16 -0600 received badge  Taxonomist
2016-08-05 03:18:25 -0600 received badge  Enthusiast
2016-08-05 03:18:25 -0600 received badge  Enthusiast
2016-07-28 15:22:00 -0600 asked a question Getting wrongly rotated pointcloud from openni kinect plugin

Hi,

I've been trying to implement the openni kinect plugin for a px4 powered quadcopter simulation. The goal is to generate an octomap and use that to navigate. The resulting point cloud is rotated wrongly around the copter position, similarly as discussed here: http://answers.ros.org/question/21839... It seems like the internal reference frame of the camera is oriented differently than the world reference frame in rviz. The camera image is oriented correctly though.

Since I want to simulate the uncertainty of the position measurement to get an idea of the accuracy the copter reference frame is published separately, with added noise. For this reason the solution as proposed in http://answers.ros.org/question/21839... does not work. Does anyone have any idea what the best/easiest place is to apply the rotation between the frames? Is it possible within the sdf file, should it be done in the published copter reference frame or is there an option within the plugin source?

Thanks for looking into this, Hielke

Here is the relevant .sdf code for the sensor: (using gazebo 6.6.0, ros-jade, rviz 1.11.10)

<sensor name='rgbd_camera_frame_sensor' type='depth'>
   <always_on>1</always_on>
   <update_rate>6</update_rate>
   <camera name='rgbd_camera'>
     <horizontal_fov>1.01229</horizontal_fov>
     <image>
       <format>R8G8B8</format>
       <width>320</width>
       <height>240</height>
     </image>
     <clip>
       <near>0.5</near>
       <far>30</far>
     </clip>
     <depth_camera>
       <output>depths</output>
     </depth_camera>
   </camera>r
   <plugin name='rgbd_camera_frame_controller' filename='libgazebo_ros_openni_kinect.so'>
     <alwaysOn>true</alwaysOn>
     <updateRate>6.0</updateRate>
     <imageTopicName>ir/image_raw</imageTopicName>
     <cameraInfoTopicName>ir/camera_info</cameraInfoTopicName>
     <depthImageTopicName>depth/image_raw</depthImageTopicName>
     <depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>
     <pointCloudTopicName>cloud_in</pointCloudTopicName>
     <frameName>dep_kinect</frameName>
     <pointCloudCutoff>0.5</pointCloudCutoff>
     <pointCloudCutoffMax>30</pointCloudCutoffMax>
     <rangeMax>30.0</rangeMax>
   </plugin>
   <visualize>true</visualize>
   <pose>0.1 0 0 0 0 0</pose>
 </sensor>