ros2_rust icon indicating copy to clipboard operation
ros2_rust copied to clipboard

Link against ROS crates for a new ROS node

Open George-Gi opened this issue 6 months ago • 4 comments

I have created a new ROS node and I have declared its dependencies in its Cargo.toml. If I do a symlink of my node's .cargo to the /ros2_ws/.cargo , cargo build works fine. However, if I don't do this symlink, the ROS crates can't be found or I have to explicitly declare their path like sensor_msgs = { version = "5.3.6", path = "/workspace/ros2_ws/install/sensor_msgs/share/sensor_msgs/rust" }. Is there another method that I am missing? I want to avoid the overhead of explicitly adding the paths and I still need the .cargo of my project to declare some env variables in the config.toml

George-Gi avatar May 12 '25 15:05 George-Gi