cargo-ros-new
A Cargo plugin for creating new Rust packages with ROS package.xml files.
Features
- Creates a standard Rust package using
cargo newwith all its features - Generates a ROS-compatible
package.xmlfile with:- Package name and version
- Maintainer information (name and email)
- License declaration
- Description
- Correct format specification
- Ament build type declaration
- Supports all
cargo newoptions:- Binary or library template (
--bin/--lib) - Edition specification (
--edition) - VCS initialization (
--vcs)
- Binary or library template (
Installation
Install from crates.io:
Usage
Basic usage
This will create:
- A new Rust package named
my_package - A
package.xmlfile with default values
With options
As a Cargo subcommand
You can also use it as a regular Cargo subcommand:
Configuration
The following default values are used if not specified:
- Maintainer: "user"
- Email: "you@email.com"
- License: "TODO: License declaration"
- Description: "TODO: Package description"
- Format: "3" (ROS package format 3)
Building from source
With Nix
If you have Nix installed, you can build and enter a development environment with:
Then build with:
Without Nix
Standard Rust build process:
License
Apache-2.0
Contributing
Contributions are welcome! Please open issues or merge requests on our GitLab repository.
ROS Compatibility
The generated packages are compatible with ROS 2 and the Ament build system through the ament_cargo build type.