ros2-rust / ros2_rust

Rust bindings for ROS 2
Apache License 2.0
928 stars 127 forks source link

Create a point cloud iterator package #245

Open nnmm opened 2 years ago

nnmm commented 2 years ago

There should be something like https://gitlab.com/ApexAI/point_cloud_msg_wrapper in the Rust ecosystem – i.e. a convenient and as-safe-as-possible way to interact with point clouds that doesn't incur a copy.

This requires good knowledge of unsafe and transmutation.

nnmm commented 2 years ago

fyi @ruffsl

stelzo commented 1 year ago

@nnmm I created something like this last week for using it with rosrust but it is a general solution for sensor_msgs/PointCloud2 and rosrust_msg is just an optional feature. There is also no unsafe at all. It should work with other packages as long as the byte buffer data can be easily converted to Vec without a copy. Here it is: https://github.com/stelzo/ros_pointcloud2.

Hopefully this helps - I started learning Rust 2 months ago, so the code is probably not up to some standards but I am willing to learn!

stelzo commented 6 months ago

ros_pointcloud2 supports rclrs now. A better integration could be made when #11 is done. So I think this issue can be closed @nnmm.