Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Point Cloud Compression for ROS

License

NotificationsYou must be signed in to change notification settings

ros-perception/point_cloud_transport

Repository files navigation

Licence

ROS2 DistroBuild StatusPackage build
RollingBuild StatusBuild Status
JazzyBuild StatusBuild Status
HumbleBuild StatusBuild Status

Description

point_cloud_transport is aROS 2 package for subscribing to and publishingPointCloud2 messages via different transport layers.E.g. it can provide support for transporting point clouds in low-bandwidth environment usingDraco compression library.

Usage

point_cloud_transport can be used to publish and subscribe toPointCloud2 messages. At this level of usage, it is similar to using ROS 2 Publishers and Subscribers. Usingpoint_cloud_transport instead of the ROS 2 primitives, however, gives the user much greater flexibility in how point clouds are communicated between nodes.

For complete examples of publishing and subscribing to point clouds usingpoint_cloud_transport, seeTutorial.

C++

Communicating PointCloud2 messages usingpoint_cloud_transport:

#include<rclcpp/rclcpp.hpp>#include<point_cloud_transport/point_cloud_transport.hpp>voidCallback(const sensor_msgs::msg::PointCloud2::ConstSharedPtr& msg){// ... process the message}auto node = std::make_shared<rclcpp::Node>();point_cloud_transport::PointCloudTransportpct(node);point_cloud_transport::Subscriber sub = pct.subscribe("in_point_cloud_base_topic",1, Callback);point_cloud_transport::Publisher pub = pct.advertise("out_point_cloud_base_topic",1);

Alternatively, you can use point_cloud_transport outside of ROS2.

#include<sensor_msgs/msg/point_cloud2.hpp>#include<point_cloud_transport/point_cloud_codec.hpp>point_cloud_transport::PointCloudCodec codec;sensor_msgs::msg::PointCloud2 msg;// ... do some cool pointcloud generation stuff ...// untyped version (outputs an rclcpp::SerializedMessage)rclcpp::SerializedMessage serialized_msg;bool success = codec.encode("draco", msg, serialized_msg);// OR// typed version (outputs whatever message your selected transport returns,// for draco that is a point_cloud_interfaces::msg::CompressedPointCloud2)point_cloud_interfaces::msg::CompressedPointCloud2 compressed_msg;bool success = codec.encode("draco", msg, compressed_msg);

Republish rclcpp component

We provide a process to republish any topic speaking in a given transport to a different topic speaking a different transport.e.g. have it subscribe to a topic you recorded encoded using draco and publish it as a raw, decoded message

ros2 run point_cloud_transport republish --ros-args -p in_transport:=raw -p out_transport:=draco --remap in:=input_topic_name --remap out:=ouput_topic_name

Python

The functionality ofpoint_cloud_transport is also exposed to python viapybind11 andrclpy serialization.

Please seepublisher.py andsubscriber.py for example usage.

Whitelist point cloud transport

This allows you to specify plugins you do want to load (a.k.a. whitelist them).

ros2 run point_cloud_transport_tutorial my_publisher --ros-args -p pct.point_cloud.enable_pub_plugins:=["point_cloud_transport/zlib"]

Known transports

Authors

ROS 1 Version:

  • Jakub Paplhám -Initial work -paplhjak
  • Ing. Tomáš Petříček, Ph.D. -Supervisor -tpet
  • Martin Pecka -Maintainer -peci1

ROS 2 Version:

  • John D'Angelo -Port to ROS 2 and Maintainer -john-maidbot
  • Alejandro Hernández -Port to ROS 2 and Maintainer -ahcorde

License

This project is licensed under the BSD License - see theLICENSE file for details.

Acknowledgments

Support

For questions/comments please email the maintainer mentioned inpackage.xml.

If you have found an error in this package, please file an issue at:https://github.com/ros-perception/point_cloud_transport/issues

Patches are encouraged, and may be submitted by forking this project andsubmitting a pull request through GitHub. Any help is further development of the project is much appreciated.


[8]ページ先頭

©2009-2025 Movatter.jp