Hello, I have compiled an ardupilot firmware with the “–enable-dds” flag to enable AP-DDS for ROS2 communication between Navigator and an offboard computer, however it is not recognised by navigator. Is there any other way to get DDS working onboard Navigator?
Hi @Sir_MuEL -
Welcome to the forums!
What firmware are you trying to work with? For ROS control of ArduSub, I’m afraid DDS isn’t supported. You may have luck with the ROS2 extension in BlueOS - this will require you to install 64bit BlueOS - the ROS2 extension is only built for this architecture. This documentation may be helpful!
Well, it could work. but I’m not sure of how much it has been tested with ardusub.
@Sir_MuEL can you ellaborate what you mean by “recognised by navigator”?
How are you building it?
Just in case, this is how I usually build it:
./waf configure --board Navigator --toolchain /opt/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf
IIRC compilers newer than 10.2 can cause glibc issues.
@williangalvani & @tony-white Hello, I’m working with the Blueboat, and built the ardurover firmware using:
./waf configure --board navigator --enable-dds
./waf rover
And upon upload, navigator won’t recognize it. However when I build simply with the command:
./waf configure --board navigator
It works fine, except this time I can’t enable dds
I got mavros working (my pi is 64bit), but I just wanted to find out if AP_DDS can be used as a substitute
Oh, for 64bits you need to use --board navigator64
But I am assuming you know what you are doing regarding ROS/dds, because I personally don’t have much experience with it.
I did attempt that as well, but it still didn’t work. I’ll simply resolve to using MAVROS for now. Thanks for your response
Hi @Sir_MuEL
You may want to ask for help in the discord forum of Ardupilot - they should better understand AP_DDS / SITL setup.
These instructions may also be helpful!
There is a very recent change to ArduPilot that may help.
With this change I was able get DDS messages (IMU, etc.) flowing from a Pi+Navigator (32-bit) to a host computer.
My build command:
./waf configure --board Navigator --enable-dds --toolchain ~/toolchains/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf
Hi @clyde
Thank you for that amazing PR. Now, the DDS-enabled firmware can be flashed, and the ROS topics are available. However, after I flashed the firmware, I got a PreArm Error:
AP: PreArm: Internal errors 0x100000 l:2354 flow_of_ctrl
This error doesn’t show up when building without the --enable-dds
flag. Any idea how to solve this? Thank you.
That usually means the loop rate slipped very badly. IIRC it means one of the loops took 5x the time it was supposed to, which ardupilot considers a critical failure as it could be bad enough to take copter out of the sky.
Restarting the autopilot should reset this, but I’d check of other sw using too much cpu.
It is on our to-do list to allow running ardupilot on a (or maybe two) dedicated core(s), which should help, too.