Skip to content

Conversation

skrobchik
Copy link
Contributor

No description provided.

@skrobchik
Copy link
Contributor Author

Seems to work correctly. I am still getting a build error with std_msgs, but that also happens on main branch if I set the edition to 2021.

error: failed to select a version for the requirement `std_msgs = "*"`
  version 4.2.3 is yanked

@skrobchik
Copy link
Contributor Author

Nevermind, I have to build the entire ros2_rust project to test this properly. And for some reason CMake can't find Python 😠

CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Python3_NumPy_INCLUDE_DIRS NumPy) (found
  version "3.12.3")
Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.28/Modules/FindPython/Support.cmake:3862 (find_package_handle_standard_args)
  /usr/share/cmake-3.28/Modules/FindPython3.cmake:545 (include)
  /opt/ros/jazzy/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:22 (find_package)
  /opt/ros/jazzy/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
  /opt/ros/jazzy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:280 (ament_execute_extensions)
  CMakeLists.txt:16 (rosidl_generate_interfaces)

@skrobchik
Copy link
Contributor Author

Ok, I removed everything and reinstalled colcon-cargo and colcon-ros-cargo as system packages in Ubuntu with --break-system-packages instead of venv.

Then installed cargo-ament-build with cargo from my local git repo.

Now it actually build, but there's some errors with the ros2_rust example.

@mxgrey
Copy link

mxgrey commented Mar 10, 2025

Now it actually build, but there's some errors with the ros2_rust example.

If it's an error in the behavior then it may be related to ros2-rust/ros2_rust#463

@skrobchik
Copy link
Contributor Author

I think the example in the tutorial may be outdated.

Anyways, I took one of the minimal examples and tried with it.

git switch -C ../cargo-ament-build main
cargo install --path ../cargo-ament-build
colcon build

Fails with

--- stderr: republisher_node                                                                                                           
Error in cargo-ament-build

Caused by:
    0: unknown variant `2024`, expected one of `2015`, `2018`, `2021` for key `package.edition` at line 6 column 1
    1: unknown variant `2024`, expected one of `2015`, `2018`, `2021` for key `package.edition` at line 6 column 1
---

With this patch

git switch -C ../cargo-ament-build up-manifest
cargo install --path ../cargo-ament-build
colcon build

The build completes successfully.

@skrobchik
Copy link
Contributor Author

@esteve I think this should be good to merge. Can you please review it?

Copy link
Contributor

@esteve esteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skrobchik thanks!

@skrobchik
Copy link
Contributor Author

Seems like macos job is stuck

@skrobchik
Copy link
Contributor Author

@mxgrey @esteve Is there anything else required to get this merged?

@Guelakais
Copy link

Are you still there? Guys, the communication isn't going so well.

@esteve
Copy link
Contributor

esteve commented Apr 15, 2025

@skrobchik apologies for the delay, it looks like the CI was failing because the macOS 12 runner has been removed from GtiHub, I've submitted #24 and we'll merge it soon. Afterwards I'll rebase this PR and we can merge it. Thanks for the patience.

@esteve
Copy link
Contributor

esteve commented Apr 15, 2025

@skrobchik CI now passes, merging the changes. Thanks!

@esteve esteve merged commit 81eafe6 into ros2-rust:main Apr 15, 2025
21 checks passed
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.

4 participants