Reader small image

You're reading from  Mastering ROS for Robotics Programming, Third edition - Third Edition

Product typeBook
Published inOct 2021
PublisherPackt
ISBN-139781801071024
Edition3rd Edition
Concepts
Right arrow
Authors (2):
Lentin Joseph
Lentin Joseph
author image
Lentin Joseph

Lentin Joseph is an author and robotics entrepreneur from India. He runs a robotics software company called Qbotics Labs in India. He has 7 years of experience in the robotics domain primarily in ROS, OpenCV, and PCL. He has authored four books in ROS, namely, Learning Robotics using Python, Mastering ROS for Robotics Programming, ROS Robotics Projects, and Robot Operating System for Absolute Beginners. He is currently pursuing his master's in Robotics from India and is also doing research at Robotics Institute, CMU, USA.
Read more about Lentin Joseph

Jonathan Cacace
Jonathan Cacace
author image
Jonathan Cacace

Jonathan Cacace was born in Naples, Italy, on December 13, 1987. He received his Master's degree in computer science, and a Ph.D. degree in Information and Automation Engineering, from the University of Naples Federico II. Currently, he is an Assistant Professor at the University of Naples Federico II. He is also a member of PRISMA Lab where he is involved in different research projects focused on industrial and service robotics in which he has developed several ROS-based applications integrating robot perception and control.
Read more about Jonathan Cacace

View More author details
Right arrow

Working with point cloud data

We can handle the point cloud data from Kinect or other 3D sensors to perform a wide variety of tasks, such as 3D object detection and recognition, obstacle avoidance, 3D modeling, and so on. In this section, we will look at some basic functionalities; that is, using the PCL library and its ROS interface. We will discuss the following topics:

  • How to publish a point cloud in ROS
  • How to subscribe and process a point cloud
  • How to write point cloud data to a PCD file
  • How to read and publish a point cloud from a PCD file

Let's learn how to publish point cloud data as a ROS topic using a C++ example.

How to publish a point cloud

In this example, we will learn how to publish point cloud data using the sensor_msgs/PointCloud2 message. The code will use PCL APIs to handle and create the point cloud, as well as to convert the PCL cloud data into the PointCloud2 message type.

You can find the pcl_publisher.cpp example code...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering ROS for Robotics Programming, Third edition - Third Edition
Published in: Oct 2021Publisher: PacktISBN-13: 9781801071024

Authors (2)

author image
Lentin Joseph

Lentin Joseph is an author and robotics entrepreneur from India. He runs a robotics software company called Qbotics Labs in India. He has 7 years of experience in the robotics domain primarily in ROS, OpenCV, and PCL. He has authored four books in ROS, namely, Learning Robotics using Python, Mastering ROS for Robotics Programming, ROS Robotics Projects, and Robot Operating System for Absolute Beginners. He is currently pursuing his master's in Robotics from India and is also doing research at Robotics Institute, CMU, USA.
Read more about Lentin Joseph

author image
Jonathan Cacace

Jonathan Cacace was born in Naples, Italy, on December 13, 1987. He received his Master's degree in computer science, and a Ph.D. degree in Information and Automation Engineering, from the University of Naples Federico II. Currently, he is an Assistant Professor at the University of Naples Federico II. He is also a member of PRISMA Lab where he is involved in different research projects focused on industrial and service robotics in which he has developed several ROS-based applications integrating robot perception and control.
Read more about Jonathan Cacace