add windows support#66
Conversation
d4c7295 to
9a40451
Compare
9a40451 to
9233af8
Compare
|
Hi. Thanks, this is really valuable. Is it ready for review/merge? I hope to be able to test it later this week, anything I should know when testing it on windows? (Haven't used windows in a long time). Another question, since it sounds like you have experience with cargo-ament, is your feeling that cargo-ament makes r2r_cargo.cmake reduntant? If so I think we should try to drop it. |
|
Hi, regarding cargo-ament: https://github.com/colcon/colcon-ros-cargo#usage the problem is that if this is installed no way to make colcon understand that the project is cmake and not cargo. I think it's a bug. in the package.xml the build_type should be used. anyway once colcon-ros-cargo and https://github.com/colcon/colcon-cargo are installed compilation works w/o the cmake file, so IMO you can drop the cmake work around ++ |
|
I tried it yesterday evening, and as I suspected I couldn't get it to compile under windows. This is where I got stuck: It looks like bindgen didn't like the |
|
I didn't get this error, here's a step by step how I build/run the r2r_minimal_node
$env:PATH = "C:\Python38;C:\Python38\Scripts;$env:PATH"
C:\ros2\ros2_humble\ros2-windows\setup.ps1
colcon build --event-handlers desktop_notification- --cargo-args --release --cmake-args -Wno-dev
r2r_minimal_node src\r2r_minimal_node\r2r_minimal_node (ament_cargo)
r2r_minimal_node_msgs src\r2r_minimal_node\r2r_minimal_node_msgs (ros.ament_cmake)
Starting >>> r2r_minimal_node_msgs
Finished <<< r2r_minimal_node_msgs [14.6s]
Starting >>> r2r_minimal_node
[Processing: r2r_minimal_node]
Finished <<< r2r_minimal_node [57.9s]
Summary: 2 packages finished [1min 13s]let me know if with those steps you still have issues, in this case I will start a fresh install of all my env and try to reproduce your issue |
|
I tried your steps (except I didn't have ament_cargo) but I got the same error as before. My setup is roughly:
Are you able to build r2r without colcon? I.e. just cargo build in the r2r root after sourcing humble. |
|
Yes I'm able to compile python --version
Python 3.8.5and sorry missed your question about clang here's how I did the installation: clang, basicly what is related to ros2 I followed ros2 and what is related to rust/bindgen I followed rust ones. |
|
I updated clang and no change. If I simply remove the |
|
With the workaround I pushed I can build r2r against the stock humble install. Not very elegant but it works for now. I am ready to merge this if it still works for you. |
|
Nice WA :-) yes it's ok for me |
This PR is to have r2r works under windows, this also enable using cargo-ament for building with colcon
By default once cargo-ament is installed any package containing a package.xml and Cargo.toml is considered as cargo-ament, so using the custom r2r_cargo.cmake does not work anymore