ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The most likely error is that you never set the frame, yes. But to be sure RViz usually tells what the problem is in the displays section (left) of the window.

All you have to do it to run a node together with the rest of your code that publishes the corresponding transformation between any of the frames in your TF (world or base_link for instance) to the frame you want the laserscan to be represented. For this, you can follow this python or c++ tutorials. In those tutorials, just change the parameters of the transformations and the frame names.

Note: For your application, it seems that the approach stereo-vision to laserscan is a bit unefficient if you are computing the full pointcloud from the cameras. If you are going to use only the laserscan (and not the pointcloud for any other reason) I suggest just to get the 3D data from the corresponding plane and transform directly into laserscan instead of having all the overhead in the middle.