Same issue for me on clean ubuntu 22 install on current ardupilot master
Full rebuild logs in .txt file (command: colcon build --packages-up-to ardupilot_dds_tests --event-handlers=console_cohesion+ &> build_log.txt) build_log.txt (158.6 KB)
Noteworthy, the configuration script above makes:
Built target ament_cmake_python_copy_ardupilot_sitl
Setting top to : /home/wisnia/ros2-humble/ardu_ws/src/ardupilot
Setting out to : /home/wisnia/ros2-humble/ardu_ws/src/ardupilot/build
Autoconfiguration : enabled
Checking for program 'python' : /usr/bin/python3
running egg_info
creating ardupilot_sitl.egg-info
writing ardupilot_sitl.egg-info/PKG-INFO
writing dependency_links to ardupilot_sitl.egg-info/dependency_links.txt
writing top-level names to ardupilot_sitl.egg-info/top_level.txt
writing manifest file 'ardupilot_sitl.egg-info/SOURCES.txt'
reading manifest file 'ardupilot_sitl.egg-info/SOURCES.txt'
writing manifest file 'ardupilot_sitl.egg-info/SOURCES.txt'
Built target ament_cmake_python_build_ardupilot_sitl_egg
Checking for python version >= 3.6.9 : 3.10.12
Setting board to : sitl
Using toolchain : native
Checking for 'g++' (C++ compiler) : /usr/lib/ccache/g++
Checking for 'gcc' (C compiler) : /usr/lib/ccache/gcc
Checking for c flags '-MMD' : yes
Checking for cxx flags '-MMD' : yes
CXX Compiler : g++ 11.4.0
Checking for need to link with librt : not necessary
Checking for feenableexcept : yes
Enabling -Werror : yes
Enabled OpenDroneID : no
Enabled firmware ID checking : no
GPS Debug Logging : no
Enabled custom controller : yes
Enabled DDS : yes
Checking for HAVE_CMATH_ISFINITE : yes
Checking for HAVE_CMATH_ISINF : yes
Checking for HAVE_CMATH_ISNAN : yes
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes
Checking for NEED_CMATH_ISINF_STD_NAMESPACE : yes
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE : yes
Checking for header endian.h : yes
Checking for header byteswap.h : yes
Checking for HAVE_MEMRCHR : yes
Configured VSCode Intellisense: : no
DC_DSDL compiler in : /home/wisnia/ros2-humble/ardu_ws/src/ardupilot/modules/DroneCAN/dronecan_dsdlc
Source is git repository : yes
Update submodules : yes
Checking for program 'git' : /usr/bin/git
Littlefs : disabled
Checking for program 'size' : /usr/bin/size
Benchmarks : disabled
Unit tests : enabled
Scripting : maybe
Checking for program 'microxrceddsgen' : /home/wisnia/ros2-humble/ardu_ws/Micro-XRCE-DDS-Gen/scripts/microxrceddsgen
Scripting runtime checks : enabled
Debug build : disabled
Coverage build : disabled
Force 32-bit build : disabled
Checking for program 'rsync' : /usr/bin/rsync
Removing target_list file /home/wisnia/ros2-humble/ardu_ws/src/ardupilot/build/sitl/target_list
'configure' finished successfully (0.361s)
Built target ardupilot_configure
cannot be compiled anymore using basic ./waf copter in ~/ws/src/ardupilot directory serving the same error:
../../libraries/AP_DDS/AP_DDS_Client.cpp: In member function ‘bool AP_DDS_Client::update_topic(ardupilot_msgs_msg_Status&)’:
../../libraries/AP_DDS/AP_DDS_Client.cpp:723:35: error: ‘FS_RADIO’ was not declared in this scope; did you mean ‘FLT_RADIX’?
723 | msg.failsafe[fs_iter++] = FS_RADIO;
| ^~~~~~~~
| FLT_RADIX
compilation terminated due to -Wfatal-errors.
Waf: Leaving directory `/home/wisnia/ros2-humble/ardu_ws/src/ardupilot/build/sitl'
Build failed
-> task in 'objs/AP_DDS' failed (exit status 1):
{task 140513870770272: cxx AP_DDS_Client.cpp -> AP_DDS_Client.cpp.0.o}
(run with -v to display more information)
Is the fix for this issues merged? I have pulled the recent code in MicroXrceDDSGen and it has this commit b884005 (HEAD -> master, origin/master, origin/HEAD) Patch for code gen and failing checks 92d03c8 Updated C-style global constant naming but I am still facing this issue ‘FS_RADIO’ was not declared in this scope; did you mean ‘FLT_RADIX’.
Hi, so sorry I ran into this same issue with FS_RADIO, I am using the master branch for ardupilot, however I am unsure how to use the v4.5.1 release of Micro-XRCE-DDS-Gen. Could anyone guide me through this? Thank you so much!
After ./gradlew assemble I have this error on colcon build
Starting >>> ardupilot_sitl
--- stderr: ardupilot_sitl
../../libraries/AP_DDS/AP_DDS_Client.cpp: In member function ‘bool AP_DDS_Client::update_topic(ardupilot_msgs_msg_Status&)’:
../../libraries/AP_DDS/AP_DDS_Client.cpp:723:35: error: ‘FS_RADIO’ was not declared in this scope; did you mean ‘Status::FS_RADIO’?
723 | msg.failsafe[fs_iter++] = FS_RADIO;
| ^~~~~~~~
| Status::FS_RADIO
compilation terminated due to -Wfatal-errors.
Build failed
-> task in 'objs/AP_DDS' failed (exit status 1):
{task 131436372308512: cxx AP_DDS_Client.cpp -> AP_DDS_Client.cpp.0.o}
(run with -v to display more information)
gmake[2]: *** [CMakeFiles/ardupilot_build.dir/build.make:70: CMakeFiles/ardupilot_build] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:168: CMakeFiles/ardupilot_build.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2