how to publish tf in gazebo simulation with depth camera for octomap_server
I am using gazebo simulation for drone. I mounted a depth camera on the drone in gazebo. It can publish its odom and pointcloud2 correctly. I would like to use octomap_mapping.launch to get the octree for planning usage, and I change frame_id to /odom, cloud_in to pointcloud2. However, there is nothing when I check with Rviz.
I think the reason is because my gazebo simulation does not publish a tf, but I am not sure how to do that. Can anyone tell me what tf should I publish and how to do that?
<plugin name='camera_plugin' filename='libgazebo_ros_openni_kinect.so'>
<baseline>0.2</baseline>
<alwaysOn>1</alwaysOn>
<updateRate>0.0</updateRate>
<cameraName>camera_ir</cameraName>
<imageTopicName>/camera/color/image_raw</imageTopicName>
<cameraInfoTopicName>/camera/color/camera_info</cameraInfoTopicName>
<depthImageTopicName>/camera/depth/image_raw</depthImageTopicName>
<depthImageCameraInfoTopicName>/camera/depth/camera_info</depthImageCameraInfoTopicName>
<pointCloudTopicName>/camera/depth/points</pointCloudTopicName>
<frameName>camera_link</frameName>
<pointCloudCutoff>0.3</pointCloudCutoff>
<pointCloudCutoffMax>20</pointCloudCutoffMax>
<distortionK1>0</distortionK1>
<distortionK2>0</distortionK2>
<distortionK3>0</distortionK3>
<distortionT1>0</distortionT1>
<distortionT2>0</distortionT2>
<CxPrime>0</CxPrime>
<Cx>0</Cx>
<Cy>0</Cy>
<focalLength>0</focalLength>
<hackBaseline>0</hackBaseline>
</plugin>