Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colcon profile unused #8

Open
stelzo opened this issue Apr 15, 2024 · 2 comments
Open

colcon profile unused #8

stelzo opened this issue Apr 15, 2024 · 2 comments

Comments

@stelzo
Copy link

stelzo commented Apr 15, 2024

The Readme says that 'r2r_cargo expects a custom profile called colcon to exist' but when I build without specifying the profile in the Cargo.toml, it still builds without a problem. I tested it with the minimal nodes and the exact instructions from the Readme (building with colcon).

Also, because it does not use the colcon profile, the release profile is not inherited, which can be proven by adding

#[cfg(debug_assertions)]
r2r::log_warn!("debug", "I am in debug mode :(");

to the main.rs.

@stelzo
Copy link
Author

stelzo commented Apr 16, 2024

I switched the computer and it the issue wasn't there. I think I know what happened:
When having ros2_rust tools installed and building r2r nodes at the same time, the colcon-cargo plugin takes over the build process and ignores the CMakeLists.txt inside r2r nodes completely so the profile is never specified.

The workaround is to uninstall the ros2_rust tools with pip before building r2r nodes again. I think this problem is still relevant for some people even though it is not a real problem of r2r but the colcon-cargo project. I would advice closing this issue after colcon-cargo is fixed in that regard.

@m-dahl
Copy link
Owner

m-dahl commented Apr 17, 2024

Hi,

Maybe the real fix is to migrate to colcon-cargo and ditch the custom cmake hack :) It seems like with colcon-cargo it built out of the box for you since you didn't notice, so maybe it wouldn't require much work. I haven't looked at it, do you see any downside to switching to colcon-cargo? Feel free to open an issue on r2r if you think such a migration makes sense.

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

No branches or pull requests

2 participants