Skip to content

Use colcon plugins#9

Open
stelzo wants to merge 4 commits into
m-dahl:masterfrom
stelzo:colcon-plugins
Open

Use colcon plugins#9
stelzo wants to merge 4 commits into
m-dahl:masterfrom
stelzo:colcon-plugins

Conversation

@stelzo

@stelzo stelzo commented May 27, 2024

Copy link
Copy Markdown

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

m-dahl commented Jul 4, 2024

Copy link
Copy Markdown
Owner

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

stelzo commented Jul 31, 2024

Copy link
Copy Markdown
Author

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 colcon/colcon-cargo#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.

@m-dahl

m-dahl commented Oct 12, 2024

Copy link
Copy Markdown
Owner

Hi. Just to let you know I will get back to this shortly, sorry I haven't worked on open source stuff for a while.

@stelzo

stelzo commented Oct 16, 2024

Copy link
Copy Markdown
Author

No problem, there was some progress to simplify the steps to install colcon tools in the meantime. Also, installing folders is possible inside Cargo.toml, so there is no need for a build.rs script.

[package.metadata.ros]
install_to_share = ["launch"]

Here are some relevant links if you or anyone is interested.
colcon/colcon-cargo#22
colcon/colcon-ros-cargo#26
ros2-rust/cargo-ament-build#12

This will reduce the overhead of installing the additional Rust tooling to a single pip install colcon-ros-cargo or make it a rosdep dependency. The biggest missing part is cargo-ament-build, which is ongoing right now. I will update the PR afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants