Compatibility with ros2

53 views
Skip to first unread message

Boris c

unread,
Feb 13, 2024, 8:09:20 AM2/13/24
to dv-users
Hello, I was wondering if the dv-processing library was compatible with ros2 foxy. I've been able to use the library with ros1 noetic without any issues, but i'm currently struggling making it work with ros2 foxy. I don't know if the issues I'm facing are caused by some incompatibilities appearing because the library relies on c++20 (which shouldn't cause any problem as I managed to make it work with ros1) or related to how I'm linking it in my cmakelist file (i only used find_package(dv-processing) and added the dependency in ament_target_dependencies). I assume that the problem should be from my side as I'm pretty new to ros and cmake, but I wanted to have the confirmation that someone made it work with ros2.

Best regards,

Boris

Luca Longinotti

unread,
Feb 13, 2024, 8:11:13 AM2/13/24
to dv-users
Hello, at least from our side we haven't tried ROS2 yet. Unless there are compilation issues due to C++20 support like we had to work-around with ROS1 though, I don't see a reason it shouldn't work.

boris courtoy

unread,
Feb 19, 2024, 5:37:54 AM2/19/24
to dv-users
Indeed, I have compilation errors coming from the ros2 library when compiling with c++20 (mostly related to std::allocator::rebind I believe?) which do not appear when removing the include of the ros library in my c++ file. Should I modifiy directly the ros files to remove the deprecated features? Or this could be done otherwhise ? I think you managed it with ros1 without modifying the ros distribution in you dv-ros repository, but I'm not sur I'm fully understanding what you've done to fix the problem.

boris courtoy

unread,
Feb 21, 2024, 9:32:30 AM2/21/24
to dv-users
The problems were indeed related to c++ version incompatibilities. I didn't manage to fix this using ros2 foxy as there was too much modifications to do within the library, but I've switched to ros2 galactic and applying the modifications found here https://github.com/ros2/rclcpp/pull/1678 I managed to make it work.

However, I'm still interested to understand how you managed to fix the issues with ros1 in your dv-ros repository as I think you managed to fix it without modifying the distribution, so It would be awesome if you could give me a bit more details about what you've done to fix this.

Luca Longinotti

unread,
Mar 18, 2024, 12:58:02 PM3/18/24
to dv-u...@googlegroups.com
What we did to solve the accumulator-related compilation problem is described here:
The README goes into detail on what fixes are needed, but it's a very hacky solution. Using ROS Galactic with the fix applied to its core files, or even Humble which already includes it, is a much better future-proof solution.
-- 
Luca Longinotti (llongi)

Head of Embedded Platforms
iniVation AG - https://inivation.com/
Zurich, Switzerland
Office: +41 44 500 32 14
Reply all
Reply to author
Forward
0 new messages