SICKAG / sick_scan_xd

Based on the sick_scan drivers for ROS1, sick_scan_xd merges sick_scan, sick_scan2 and sick_scan_base repositories. The driver supports both Linux (native, ROS1, ROS2) and Windows (native and ROS2).
Apache License 2.0
89 stars 81 forks source link

Failed to build on windows ROS2 #329

Open kjoelovelife opened 1 month ago

kjoelovelife commented 1 month ago

Hi there,

I encountered an issue while trying to install sick_scan_xd on Windows 10 with ROS2 Humble.

The error message I received is as follows:

failed_to_build_sick

I have ensured that the path C:/sick_scan_ws/src/sick_scan_xd/include exists.

rostest commented 1 month ago

Thanks for your feedback. The path C:/sick_scan_ws/src/sick_scan_xd/include_directories looks strange as include_directories is not a subfolder in sick_scan_xd. Maybe it is from a previous build?

Please remove all temporary build folders, i.e. run

cd C:\sick_scan_ws
rmdir /s/q .\build
rmdir /s/q .\install
rmdir /s/q .\log
del /f/q .\src\CMakeLists.txt

and rebuild as described in Build on Windows ROS2:

call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64
call C:\opt\ros\humble\x64\setup.bat
colcon build --packages-select sick_scan_xd --cmake-args " -DROS_VERSION=2" --event-handlers console_direct+
call .\install\setup.bat

Please post a logfile of the entire build process if the problem persists.

kjoelovelife commented 1 month ago

Hi @rostest,

I have tested the solution you provided, but the problem still persists. Here is the logfile.

streams.log

rostest commented 1 month ago

Many thanks for following up. We have adapted CMakeLists.txt for ROS-2 humble on Windows. Please use the update in branch feature/windows_ros2_humble and rebuild.