ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi Karthik,
What you'll need to do is make sure that the frame that the LIDAR data is broadcast in (set in the Header) is referenced against the world frame with an appropriate transform. This transform needs to incorporate the roll, pitch, and yaw from the powered mounting you've built. I presume that you have a node which controls the LIDAR mount. In there, you could use the tf library (Tutorials) to broadcast a transform which relates the stationary part of the LIDAR mount to the LIDAR itself.
If you use the de-facto naming convention, you would wind up with a /base_link -> /lidar transformation. Then, set rviz to use /base_link as the fixed frame and make sure that /lidar is set as the frame_id in the header of your LIDAR data. rviz will now be able to show the LIDAR scans in 3D. Without the transform, rviz doesn't know anything about how the LIDAR is moving with respect to the world.