ros_add 0.1.3

The Purpose of the Package is to provide the `cargo ros_add` command to add dependencies to `Cargo.toml` and the `package.xml`
Documentation

cargo ros-add - ROS Dependency Management Tool

Cargo subcommand for adding dependencies to ROS Rust packages, handling both package.xml and Cargo.toml files automatically.

Installation

cargo install ros-add

Usage

cargo ros-add <dependency_name>

This will:

  1. Add the dependency to your package.xml file
  2. Attempt to add the dependency to Cargo.toml with a wildcard version (*)

Features

  • Automatic XML Handling: Adds depend elements to package.xml while preserving formatting
  • Dual Configuration: Updates both ROS (package.xml) and Rust (Cargo.toml) dependency files
  • Idempotent Operation: Won't duplicate existing dependencies
  • Error Handling: Provides clear error messages for common issues

Examples

Add a standard ROS dependency:

cargo ros-add roscpp

Add a custom ROS package dependency:

cargo ros-add my_custom_msgs

Requirements

  • Rust toolchain (cargo)
  • Existing ROS package with package.xml and Cargo.toml files

Limitations

  • Currently only adds dependencies with wildcard versions (*) in Cargo.toml
  • Requires the package to have a valid package.xml file
  • Only adds <depend> tags (not <build_depend> or <exec_depend>)

Contributing

Contributions are welcome! Please open an issue or pull request on Gitlab.

License

Apache-2.0