# `cargo ros-add` - ROS Dependency Management Tool
A Cargo subcommand for adding dependencies to ROS Rust packages, handling both `package.xml` and `Cargo.toml` files automatically.
## Installation
```bash
cargo install --git https://github.com/your-repo/ros-add
```
## Usage
```bash
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>` tags 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:
```bash
cargo ros-add roscpp
```
Add a custom ROS package dependency:
```bash
cargo ros-add my_custom_msgs
```
## Requirements
- Rust toolchain (cargo)
- ROS development environment
- 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 GitHub.
## License
[MIT License](LICENSE)