Skip to content

Recommend colcon-cargo-ros2 as simplified alternative to current build setup #553

@jerry73204

Description

@jerry73204

The current setup requires boilerplate to support Rust packages in ROS. It requires:

  • Installing colcon-cargo, colcon-ros-cargo and cargo-ament-build.
  • The manual configuration to include dependent message packages in ROS workspace
  • Maintain a .cargo/config.toml to locate Rust bindings.

I would recommend my colcon-cargo-ros2. It avoids all boilerplate mentioned above. Users simply pip-install it and the colcon build just works. The binding generation is embedded in it and it targets rclrs 0.6 on crates.io. We already tested a complex LCTK project using both Rust and ROS.

pip uninstall colcon-cargo colcon-ros-cargo  # Remove conflicting packages
pip install -user colcon-cargo-ros2

colcon build --cargo-args --release

It provides additional benefits over current method.

  • Support zero configuration. No .cargo/config.toml file. No manual message dependency management.
  • Work with any Rust workspace hierarchy.
  • Efficient binding generation process. The bindings for each msg package is generated once in one colcon build.
  • Performance. The colcon-cargo-ros2 is mostly implemented in Rust except the colcon facing parts.

I sincerely ask if you can look into it and see if could be an official alternative to colcon-cargo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions