{"id":14992184,"url":"https://github.com/openrr/ros-nalgebra","last_synced_at":"2025-04-10T00:23:32.349Z","repository":{"id":40471664,"uuid":"295726260","full_name":"openrr/ros-nalgebra","owner":"openrr","description":"rosrust \u003c-\u003e nalgebra converter macro","archived":false,"fork":false,"pushed_at":"2024-08-01T02:50:49.000Z","size":36,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-17T10:05:04.329Z","etag":null,"topics":["robotics","rust"],"latest_commit_sha":null,"homepage":"","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/openrr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-09-15T12:48:39.000Z","updated_at":"2024-08-01T02:50:52.000Z","dependencies_parsed_at":"2023-10-11T04:19:17.843Z","dependency_job_id":"b6b2ff5a-64c5-420c-9ea4-54c057be0cac","html_url":"https://github.com/openrr/ros-nalgebra","commit_stats":{"total_commits":44,"total_committers":4,"mean_commits":11.0,"dds":0.2727272727272727,"last_synced_commit":"a8fe8ed56bc644c275c21d3bca94a289b1a8c700"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrr%2Fros-nalgebra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrr%2Fros-nalgebra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrr%2Fros-nalgebra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrr%2Fros-nalgebra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openrr","download_url":"https://codeload.github.com/openrr/ros-nalgebra/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248132382,"owners_count":21053028,"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":["robotics","rust"],"created_at":"2024-09-24T15:00:51.061Z","updated_at":"2025-04-10T00:23:32.321Z","avatar_url":"https://github.com/openrr.png","language":"Rust","funding_links":[],"categories":["Robot Operating System"],"sub_categories":[],"readme":"# ros-nalgebra\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/openrr/ros-nalgebra/ci.yml?branch=main\u0026logo=github)](https://github.com/openrr/ros-nalgebra/actions) [![crates.io](https://img.shields.io/crates/v/ros-nalgebra.svg?logo=rust)](https://crates.io/crates/ros-nalgebra) [![docs](https://docs.rs/ros-nalgebra/badge.svg)](https://docs.rs/ros-nalgebra) [![discord](https://dcbadge.vercel.app/api/server/8DAFFKc88B?style=flat)](https://discord.gg/8DAFFKc88B)\n\nGenerate code to convert `geometry_msgs` into nalgebra structs, for [rosrust](https://github.com/adnanademovic/rosrust).\n\n## Pre-requirements \u0026 dependencies\n\n* [ROS](https://ros.org)\n* [Rust](https://rust-lang.org)\n* [rosrust](https://github.com/adnanademovic/rosrust)\n* [nalgebra](https://nalgebra.org/)\n\n## How to use\n\n### Easy usage: `ros_nalgebra::rosmsg_include!()`\n\nUse `ros_nalgebra::rosmsg_include` instead of `rosrust::rosmsg_include` in your code.\n\n```rust\nuse nalgebra as na;\n\nmod msg {\n    ros_nalgebra::rosmsg_include!(nav_msgs / Odometry);\n}\n\nfn main() {\n    let mut odom_msg = msg::nav_msgs::Odometry::default();\n    odom_msg.pose.pose.position.x = 1.0;\n    odom_msg.pose.pose.position.y = -1.0;\n    odom_msg.pose.pose.position.z = 2.0;\n    odom_msg.pose.pose.orientation.x = 0.0;\n    odom_msg.pose.pose.orientation.y = 0.0;\n    odom_msg.pose.pose.orientation.z = 0.0;\n    odom_msg.pose.pose.orientation.w = 1.0;\n\n    // convert into nalgebra::Isometry\u003cf64\u003e by `from()`\n    let pose = na::Isometry3::from(odom_msg.pose.pose);\n    println!(\"{pose}\");\n\n    let mut pose2 = pose.clone();\n    pose2.translation.vector.x = -5.0;\n\n    // convert into ROS msg using `into()`\n    let pose_msg: msg::geometry_msgs::Pose = pose2.into();\n    println!(\"{pose_msg:?}\");\n}\n```\n\n#### Automatically defined messages by `ros_nalgebra::rosmsg_include!()`\n\nBelow messages are automatically included by `ros_nalgebra::rosmsg_include!()`. Do not include them in your code.\n\n```text\ngeometry_msgs/Point,\ngeometry_msgs/Pose,\ngeometry_msgs/Quaternion,\ngeometry_msgs/Transform,\ngeometry_msgs/Vector3,\n```\n\n## Other usage: `ros_nalgebra!() and ros_nalgebra_msg!()`\n\nIf some messages are included already (for example in other crate), you can use `ros_nalgebra_msg!()`. The arguments are the rust namespace of the `geometry_msgs` (example:`msg`) and the message type (example: `Pose` for `geometry_msgs/Pose`, `Point` for `geometry_msgs/Point`).\n\n### Example\n\nIn `some_other_crate`,\n\n```rust\nmod msg {\n    rosrust::rosmsg_include!(geometry_msgs/Point);\n}\n```\n\nThen you can use `ros_nalgebra::ros_nalgebra_msg!()` in your crate.\n\n```rust,ignore\n// generate conversion code only for `geometry_msgs/Point` which is defined in `some_other_crate::msg`.\nros_nalgebra::ros_nalgebra_msg!(some_other_crate::msg, Point);\n```\n\n## Supported conversions\n\nSee lib.rs.\n\n## TODO\n\nHandle dependencies.\n\n## `OpenRR` Community\n\n[Here](https://discord.gg/8DAFFKc88B) is a discord server for `OpenRR` users and developers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenrr%2Fros-nalgebra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenrr%2Fros-nalgebra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenrr%2Fros-nalgebra/lists"}