Top-level Rust crate to include generated Rust code found in a sourced ROS 2 workspace.
The shape/msg/Plane message can be included with:
// Assuming the rust crate for `shape_msgs` is in the `AMENT_PREFIX_PATH`
use ros_env::shape_msgs::msg::Plane;Any Rust crate found in the AMENT_PREFIX_PATH environment variable, that has opted in, will be include!()d.
To opt in, the crate must have the following metadata present in the Cargo.toml
[package.metadata.ros-env]
include = trueBy default, crates generated from rosidl_generator_rs opt in.
- The include!() macro is literal text inclusion. As such, depending
on the number of generated crates found in
AMENT_PREFIX_PATH, the build times for this crate can be long. - The dependencies of the included crates are not included. You cannot dynamically alter cargo dependencies through
anything other than features, and features need to be explicitly declared and enabled. As such, this crate must have
all expected dependencies itself (hence why this crate has a
serdedependency for example).
Generative tools are allowed in producing contributions to its projects, with some qualifications:
- Any contribution may consist, in whole or in part, of the output of one or more generative tools.
- Any use of generative tools in a contribution must be disclosed at the time of making the contribution.
- The disclosure must be recorded in a way that ensures it has the same or greater lifetime as the contribution itself.
For source code contributions, you should add a disclosure statement in the commit message for all commits where some portion of the source code was generated.
Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]
Provide a similar disclosure statement in the PR description.
See the projects AI Policy for more details.