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

New message format for compressed pointcloud2?

asked 2018-07-24 01:27:44 -0600

cathyshen gravatar image

I'm trying to subscribe the pointcloud message (~10MByte per frame) from a 3D camera, but find the DDS transmission consumed lots of bandwidth, and the latency is unacceptable under ROS2.

Considering pointcloud is more and more important for robot usages and actually it has big potential to be compressed, I'd like to check if it's possible to add a new message format in sensor_msgs, something like CompressedPointCloud2 for the data compressed by pcl. Thus the transmission effectiveness will be improved a lot.

Is there any other better idea?

edit retag flag offensive close merge delete

Comments

Please include more information in your question. For example what programming language are you experiencing this with (C++ or Python), what version of ROS 2 you are using, etc.

Dirk Thomas gravatar image Dirk Thomas  ( 2018-07-24 16:40:40 -0600 )edit

@cathyshen also, can you in addition to what Dirk asked, provide e.g. a bag with the PointCloud2 data so we can benchmark?

dejanpan gravatar image dejanpan  ( 2018-07-24 19:25:10 -0600 )edit

@Dirk Thomas, @dejanpan, I'm using C++ and the ROS2 version is Bouncy. I can provide a PCD file with 1 frame 640x480 pointcloud2 data inside, but the file size is too big to share here which is about 12M. A manipulate PCD file should also work to reproduce this issue.

cathyshen gravatar image cathyshen  ( 2018-07-25 04:08:48 -0600 )edit
peci1 gravatar image peci1  ( 2018-11-21 11:54:06 -0600 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2018-07-24 15:43:35 -0600

There is a Discourse thread regarding this issue:

https://discourse.ros.org/t/image-and...

In short: The performance on large messages like PointCloud2 seems to be much worse in ROS2 than in ROS1. Since transferring large point clouds is a common use case, this is unacceptable, and I expect this to be fixed at some point. This is the core issue behind your problem, so it should be addressed first.


That being said, it sounds like a great idea to offer point cloud compression! However, before a message is added to the core ROS message packages like sensor_msgs, there should be at least one (but better several) implementations that use the proposed message for a longer time. So the first step would be for you to create that message in your own code and provide an implementation. If this is successful and there is wide-spread interest, one can begin the process of adding the message to sensor_msgs. If you want to go down this road, let me suggest Google Draco for point cloud compression:

https://github.com/google/draco

I haven't used it myself yet, but it looks extremely intriguing.

edit flag offensive delete link more

Comments

That's really informative! Glad to know there is patch to fix the big-size data transmission issue in fastrtps. It's fair to have a reference implementation for compressed pointcloud msgs. I'll look at both pcl Octree and draco solutions.

cathyshen gravatar image cathyshen  ( 2018-07-25 04:14:03 -0600 )edit

Hmm... but if you use an octree to downsample a point cloud, the result will be a regular point cloud with fewer points, not a lossless compressed pointcloud. So we wouldn't need a new message type. Am I missing something?

Martin Günther gravatar image Martin Günther  ( 2018-07-26 04:33:51 -0600 )edit

you probably are right, let me do further investigation on kinds of solutions, and back to you.

cathyshen gravatar image cathyshen  ( 2018-07-26 20:06:26 -0600 )edit
3

I have implemented a point_cloud_transport package for transport of PointCloud2 messages, which uses plugin interface ala image_transport. In the README, you can also find links to other repositories, which contain but are not limited to:

  • plugin for compression using Google Draco
  • template for implementing your custom plugins
  • tutorial on how to use the package

Any help in further development of the project is welcome and appreciated.

Hope that this helps.

paplhjak gravatar image paplhjak  ( 2019-08-12 04:55:49 -0600 )edit

Question Tools

4 followers

Stats

Asked: 2018-07-24 01:27:44 -0600

Seen: 2,164 times

Last updated: Jul 24 '18