my task is to send telemetry Data from one Pixhawk 2.4. to another via CAN. I decided to use UAVCAN, cause it’s already intagrated in px4 Firmware. I build two modules containing publisher and subscriber example from UAVCAN.org (https://uavcan.org/Implementations/Libuavcan/Tutorials/3._Publishers_and_subscribers/).
When I try to compile the code with command make px4_fmu-v3_default, I got followoing error:
Does someone know how to fix that problem and succesfully compilate UAVCAN examples?
Or might it be better to use another CAN protocol for my porpouses?
C++ STL is needed for compiling the subscriber example (e.g. lambda functions). I also tried to compile cpp_03 example at the bottom of the site, but I got this error message:
error: 'string' in namespace 'std' does not name a type
Node(uavcan::NodeID self_node_id, const std::string& self_node_name) :
std:string is part of string header from C++ STL and not included in PX4 header string. Is there a way to replace std::stringby an different data type without causing definition conflicts?
Lambda functions have nothing to do with STL. Neither does Libuavcan – it is usable without STL as described in the documentation. The examples are not intended to be copy-pasted into an embedded codebase, it won’t work; instead, they are intended to be a high-level API usage demonstration.