{"id":28206414,"url":"https://github.com/stelzo/ros_pointcloud2","last_synced_at":"2025-06-11T21:31:12.955Z","repository":{"id":155165000,"uuid":"632549631","full_name":"stelzo/ros_pointcloud2","owner":"stelzo","description":"A PointCloud2 message conversion library for ROS1 and ROS2.","archived":false,"fork":false,"pushed_at":"2025-05-16T12:37:46.000Z","size":269,"stargazers_count":18,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-16T13:45:27.711Z","etag":null,"topics":["pointcloud","pointcloud2","ros","ros1","ros2","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/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/stelzo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-04-25T16:29:27.000Z","updated_at":"2025-05-03T07:15:01.000Z","dependencies_parsed_at":"2024-03-25T12:46:48.020Z","dependency_job_id":"de3a34e2-c603-47b6-a18a-a41262e11389","html_url":"https://github.com/stelzo/ros_pointcloud2","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/stelzo/ros_pointcloud2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelzo%2Fros_pointcloud2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelzo%2Fros_pointcloud2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelzo%2Fros_pointcloud2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelzo%2Fros_pointcloud2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stelzo","download_url":"https://codeload.github.com/stelzo/ros_pointcloud2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelzo%2Fros_pointcloud2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259345539,"owners_count":22843556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-05-17T10:09:47.185Z","updated_at":"2025-06-11T21:31:12.944Z","avatar_url":"https://github.com/stelzo.png","language":"Rust","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 \u003ca href=\"https://github.com/stelzo/ros_pointcloud2/tree/main/tests\"\u003e\u003cimg src=\"https://github.com/stelzo/ros_pointcloud2/actions/workflows/tests.yml/badge.svg\" alt=\"\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\nros_pointcloud2 uses its own type for the message `PointCloud2Msg` to keep the library framework agnostic. ROS1 and ROS2 are supported with feature flags.\n\nGet started with the example below, check out the other use cases in the `examples` folder or see the [Documentation](https://docs.rs/ros_pointcloud2/0.5.2/) for a complete guide.\n\n## Quickstart\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(91.486, -4.1, 42.0001, 0.1),\n  PointXYZI::new(f32::MAX, f32::MIN, f32::MAX, f32::MIN),\n];\n\nlet out_msg = PointCloud2Msg::try_from_vec(cloud_points).unwrap();\n\n// Convert the ROS crate message type, we will use r2r here.\n// let msg: r2r::sensor_msgs::msg::PointCloud2 = out_msg.into();\n// Publish ...\n\n// ... now incoming from a topic.\n// let in_msg: PointCloud2Msg = msg.into();\nlet in_msg = out_msg;\n\nlet processed_cloud = in_msg.try_into_iter().unwrap()\n  .map(|point: PointXYZ| { // Define the info you want to have from the Msg.\n      // Some logic here ...\n\n      point\n  })\n  .collect::\u003cVec\u003c_\u003e\u003e();\n```\n\n## Integrations\n\nThere are currently 3 integrations for common ROS crates.\n\n- [rosrust_msg](https://github.com/adnanademovic/rosrust)\n  - [![Tests](https://github.com/stelzo/ros_pointcloud2/actions/workflows/rosrust_noetic.yml/badge.svg)](https://github.com/stelzo/ros_pointcloud2/actions/workflows/rosrust_noetic.yml)\n- [r2r_msg](https://github.com/sequenceplanner/r2r)\n  - [![Tests](https://github.com/stelzo/ros_pointcloud2/actions/workflows/r2r_galactic.yml/badge.svg)](https://github.com/stelzo/ros_pointcloud2/actions/workflows/r2r_galactic.yml)\n  - [![Tests](https://github.com/stelzo/ros_pointcloud2/actions/workflows/r2r_humble.yml/badge.svg)](https://github.com/stelzo/ros_pointcloud2/actions/workflows/r2r_humble.yml)\n  - [![Tests](https://github.com/stelzo/ros_pointcloud2/actions/workflows/r2r_iron.yml/badge.svg)](https://github.com/stelzo/ros_pointcloud2/actions/workflows/r2r_iron.yml)\n  - [![Tests](https://github.com/stelzo/ros_pointcloud2/actions/workflows/r2r_jazzy.yml/badge.svg)](https://github.com/stelzo/ros_pointcloud2/actions/workflows/r2r_jazzy.yml)\n- [rclrs_msg](https://github.com/ros2-rust/ros2_rust)\n  - [![Tests](https://github.com/stelzo/ros_pointcloud2/actions/workflows/rclrs_humble.yml/badge.svg)](https://github.com/stelzo/ros_pointcloud2/actions/workflows/rclrs_humble.yml)\n  - [![Tests](https://github.com/stelzo/ros_pointcloud2/actions/workflows/rclrs_iron.yml/badge.svg)](https://github.com/stelzo/ros_pointcloud2/actions/workflows/rclrs_iron.yml)\n  - [![Tests](https://github.com/stelzo/ros_pointcloud2/actions/workflows/rclrs_jazzy.yml/badge.svg)](https://github.com/stelzo/ros_pointcloud2/actions/workflows/rclrs_jazzy.yml)\n\nYou can use `rosrust` and `r2r` by enabling the respective feature:\n\n```toml\n[dependencies]\nros_pointcloud2 = { version = \"*\", features = [\"r2r_msg\"]}\n# or\nros_pointcloud2 = { version = \"*\", features = [\"rosrust_msg\"]}\n```\n\n### rclrs (ros2_rust)\n\nFeatures do not work properly with `rcrls` because the messages are linked externally. You need to use tags instead:\n\n```toml\n[dependencies]\nros_pointcloud2 = { git = \"https://github.com/stelzo/ros_pointcloud2\", tag = \"v0.5.2_rclrs\" }\n```\n\nAlso, indicate the following dependencies to your linker inside the `package.xml` of your package.\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 other integrations.\n\n## Performance\n\nThis library offers a speed up when compared to PointCloudLibrary (PCL) conversions but the specific factor depends heavily on the use case and system.\nSee [this repository](https://github.com/stelzo/ros_pcl_conv_bench) for a detailed benchmark.\n\nFor minimizing the conversion overhead in general, always use the functions that best fit 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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstelzo%2Fros_pointcloud2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstelzo%2Fros_pointcloud2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstelzo%2Fros_pointcloud2/lists"}