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

Revision history [back]

There area couple of ways of getting PointCloud2 msg:

  1. You can use the laser_geometry package as laid out in this answer. This is the easier of the two approaches.
  2. You will have to manually convert the data into a PointCloud2 msg. You basically know the data format and layout of both the LaserScan msg and PointCloud2 msg from their definitions. You will have to manually build up the pointcloud2 msg using data used in the laserscan msg. This is not necessarily harder, just a bit more involved.

There area are a couple of ways of getting PointCloud2 msg:

  1. You can use the laser_geometry package as laid out in this answer. This is the easier of the two approaches.
  2. You will have to manually convert the data into a PointCloud2 msg. You basically know the data format and layout of both the LaserScan msg and PointCloud2 msg from their definitions. You will have to manually build up the pointcloud2 msg using data used in the laserscan msg. This is not necessarily harder, just a bit more involved.

There are a couple of ways of getting a PointCloud2 msg:

  1. You can use the laser_geometry package as laid out in this answer. This is the easier of the two approaches.
  2. You will have to manually convert the data into a PointCloud2 msg. You basically know the data format and layout of both the LaserScan msg and PointCloud2 msg from their definitions. You will have to manually build up the pointcloud2 msg using data used in the laserscan msg. This is not necessarily harder, just a bit more involved.

There are a couple of ways of getting a PointCloud2 msg:

  1. You can use the laser_geometry package as laid out in this answer. This is the easier of the two approaches.
  2. You will have to manually convert the data into a PointCloud2 msg. You basically know the data format and layout of both the LaserScan msg and PointCloud2 msg from their definitions. You will have to manually build up the pointcloud2 msg using data used in the laserscan msg. This is not necessarily harder, just a bit more involved.