m-dahl / r2r_minimal_node

Minimal r2r ros node.
19 stars 5 forks source link

Use colcon plugins #9

Open stelzo opened 4 months ago

stelzo commented 4 months ago

This PR removes the CMake pipeline and uses ROS Rust colcon and ament plugins instead (#8 and #4).

Release builds work with colcon build --cargo-args --release and cleaning a package before building with colcon build --clean-build. I am currently missing a simple solution for "installing" launch files. In CMake this could be done with

install(DIRECTORY launch
  DESTINATION share/${PROJECT_NAME}
)

but I haven't found an easy way with cargo yet. How would you rate the relevance for this @m-dahl ?

m-dahl commented 3 months ago

I think keeping the old behaviour has some benefits (no additional dependencies, easy to install stuff as you mentioned). What to you think about something like this to show both approaches?

stelzo commented 2 months ago

I think it is a good approach in theory but in practice it makes the repo a little bit more overhead when using it as a template. I wanted to look into an "ROS installation step" via build.rs but didn't do it yet. I am also waiting for https://github.com/colcon/colcon-cargo/issues/22 so the plugins can be downloaded with pip rosdep. It would reduce the overhead for adding Rust nodes in general and make the process more seamless. With installation and rosdep solved, I would prefer using only the colcon plugins and remove cmake completely. I would argue that dependencies installed via rosdep are ROS-toolchain-native and thus okay for the process.