{"id":49071516,"url":"https://github.com/uos/ros_pointcloud2","last_synced_at":"2026-04-20T08:01:38.341Z","repository":{"id":155165000,"uuid":"632549631","full_name":"uos/ros_pointcloud2","owner":"uos","description":"A PointCloud2 message conversion library for ROS1 and ROS2.","archived":false,"fork":false,"pushed_at":"2026-02-08T20:11:47.000Z","size":285,"stargazers_count":21,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-09T01:49:27.542Z","etag":null,"topics":["pointcloud","pointcloud2","ros","ros1","ros2","rust"],"latest_commit_sha":null,"homepage":"https://lib.rs/crates/ros_pointcloud2","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-25T16:29:27.000Z","updated_at":"2026-02-08T20:22:50.000Z","dependencies_parsed_at":"2024-03-25T12:46:48.020Z","dependency_job_id":"de3a34e2-c603-47b6-a18a-a41262e11389","html_url":"https://github.com/uos/ros_pointcloud2","commit_stats":null,"previous_names":["uos/ros_pointcloud2"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/uos/ros_pointcloud2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uos%2Fros_pointcloud2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uos%2Fros_pointcloud2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uos%2Fros_pointcloud2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uos%2Fros_pointcloud2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uos","download_url":"https://codeload.github.com/uos/ros_pointcloud2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uos%2Fros_pointcloud2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32038455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pointcloud","pointcloud2","ros","ros1","ros2","rust"],"created_at":"2026-04-20T08:00:30.871Z","updated_at":"2026-04-20T08:01:38.310Z","avatar_url":"https://github.com/uos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003eROS PointCloud2\u003c/h3\u003e\n  \u003cp align=\"center\"\u003eA PointCloud2 message conversion library.\u003c/p\u003e\n  \u003cp align=\"center\"\u003e\u003ca href=\"https://crates.io/crates/ros_pointcloud2\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/ros_pointcloud2.svg\" alt=\"\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\nThis library provides ergonomic and safe abstractions for the `PointCloud2` type, including conversions to and from prominent ROS libraries.\n\nTo remain framework-agnostic, the crate uses its own `PointCloud2Msg` type, ensuring compatibility across different ROS ecosystems.\n\nGet started with the example below or visit the [documentation](https://docs.rs/ros_pointcloud2/1.0.0-rc.3/ros_pointcloud2/) for a complete guide.\n\n## Quickstart\n\n\u003e [!NOTE]  \n\u003e We are transitioning to a new version (v1.0.0). Please open an issue if you encounter problems. The stable version remains v0.6.0. For the latest stable release, refer to the [v0.6.0 documentation](https://docs.rs/ros_pointcloud2/0.6.0/ros_pointcloud2/). Check the [changelog](./CHANGELOG.rst) for a full list of changes\n\nStart by adding the crate to your `Cargo.toml` with the features for your ROS library of choice. See the table below for a list of supported crates.\n\n```toml\n[dependencies]\nros_pointcloud2 = { version = \"1.0.0-rc.3\", features = [\"rclrs\"] } # or use the old version 0.6\n```\n\n```rust\nuse ros_pointcloud2::prelude::*;\n\n// PointXYZ (and many others) are provided by the crate.\nlet cloud_points = vec![\n  PointXYZI::new(9.6, 42.0, -6.2, 0.1),\n  PointXYZI::new(46.0, 5.47, 0.5, 0.1),\n];\n\nlet out_msg = PointCloud2Msg::try_from_slice(\u0026cloud_points).unwrap();\n\n// Outside of your main\n// impl_pointcloud2_for_rclrs!();\n\n// Convert to your ROS crate message type.\n// let msg = impl_rclrs::from_pointcloud2_msg(out_msg);\n// Publish ...\n\n// ... now incoming from a topic.\n// let in_msg = impl_rclrs::to_pointcloud2_msg(msg);\nlet in_msg = out_msg;\n\nlet processed_cloud = in_msg.try_into_iter().unwrap()\n  .map(|point: PointXYZI| { // Define the type you want to map the data to.\n    // Access the data like a normal struct.\n    PointXYZI::new(point.x, point.y, point.z, 0.1)\n  })\n  .collect::\u003cVec\u003c_\u003e\u003e();\n```\n\n## Support for ROS client libraries\n\nThere is currently support for the following ROS libraries.\n\n- [rclrs](https://docs.rs/rclrs/latest/rclrs/) Feature: `\"rclrs\"`\n- [r2r](https://docs.rs/r2r/latest/r2r/) Feature: `\"r2r\"`\n- [ros2-client](https://docs.rs/ros2-client/latest/ros2_client/) Feature: `\"ros2_interfaces_jazzy_serde\"`\n- [rosrust](https://docs.rs/rosrust/latest/rosrust/) Feature: `\"rosrust\"`\n- [roslibrust](https://docs.rs/roslibrust/latest/roslibrust/) Features: `\"roslibrust_ros1\"` and `\"roslibrust_ros2\"`\n\nSee the documentation for the respective macros for details on how to use them.\n\nNote that the macros for `roslibrust` need the root path where messages are included via `include!` as a parameter.\n\nThe macros are tested on various distros with CI. Since the message definition itself is static for a long time now, this crate should work on all ROS distros for as long as the respective ROS library or framework does not change its message generation pipeline.\n\nYou can use this library with your ROS crate by prefixing the designated macro somewhere in your scope after adding your ROS crate to your `Cargo.toml`.\n\nAlso, add the following dependencies to your `package.xml` (if your library of choice uses them) to ensure all message types are correctly resolved.\n\n```xml\n\u003cdepend\u003estd_msgs\u003c/depend\u003e\n\u003cdepend\u003esensor_msgs\u003c/depend\u003e\n\u003cdepend\u003ebuiltin_interfaces\u003c/depend\u003e\n```\n\nPlease open an issue or PR if you need support for other ROS libraries.\n\nThere is also nalgebra support to convert common point types to the nalgebra `Point3` type. Enable the `\"nalgebra\"` feature and invoke the macro.\n\n```rust\nros_pointcloud2::impl_pointxyz_for_nalgebra!();\n\n// then you can use the conversions with your current nalgebra setup\nuse ros_pointcloud2::points::PointXYZI;\nuse ros_pointcloud2::impl_nalgebra::AsNalgebra;\nlet p_xyzi = PointXYZI::new(4.0, 5.0, 6.0, 7.0);\nassert_eq!(AsNalgebra::xyz(\u0026p_xyzi), nalgebra::Point3::new(4.0, 5.0, 6.0));\n```\n\n## Performance\n\nThis library is designed with Rust's zero-cost philosophy in mind. It minimizes overhead by avoiding unnecessary allocations during conversion and leveraging zero-copy iterators and memory views for point data when possible.\n\nIn many cases, this results in a significant speedup compared to standard PointCloudLibrary (PCL) conversions. However, the exact factor depends on your specific data layout and system.\n\nUnlike many other implementations, this crate provides full spec compliance for the PointCloud2 message format, including correct handling of endianness and diverse field layouts.\n\nFor detailed benchmarks, see the [ros_pcl_conv_bench](https://github.com/stelzo/ros_pcl_conv_bench) repository.\n\nTo minimize the conversion overhead in general, always use the function that best fits your use case.\n\n### License\n\n\u003csup\u003e\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\u003c/sup\u003e\n\n\u003cbr\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuos%2Fros_pointcloud2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuos%2Fros_pointcloud2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuos%2Fros_pointcloud2/lists"}