Hello,
I have a Cube Orange and I’m trying to follow the steps from Simulation on Hardware guide ([ Simulation on Hardware — Dev documentation ]) but I’m reaching a point were I cannot continue. I want to run the Control Loop on the Cube, but handle physics in MATLAB/Simulink but when I run sitl-on-hw.py to flash CubeOrange with flag --simclass JSON it breaks (works fine with --simclass Plane):
In file included from ../../libraries/SITL/SIM_JSON.cpp:23:
../../libraries/SITL/SIM_JSON.h:67:5: error: 'SocketAPM' does not name a type
67 | SocketAPM sock;
| ^~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from ../../libraries/AP_HAL/SIMState.cpp:25:
../../libraries/SITL/SIM_JSON.h:67:5: error: 'SocketAPM' does not name a type
67 | SocketAPM sock;
| ^~~~~~~~~
compilation terminated due to -Wfatal-errors.
Waf: Leaving directory `/home/lucas/ardupilot/build/CubeOrange'
Build failed
-> task in 'objs/SITL' failed (exit status 1):
{task 138156137728048: cxx SIM_JSON.cpp -> SIM_JSON.cpp.0.o}
(run with -v to display more information)
-> task in 'objs/AP_HAL/ArduPlane' failed (exit status 1):
{task 138156160216640: cxx SIMState.cpp -> SIMState.cpp.4.o}
(run with -v to display more information)
FAILED: ./waf plane
I tried to overcome this by adding to the script define AP_SIM_JSON_ENABLED 1 define AP_NETWORKING_ENABLED 1, it was now capable of flashing the board, but now I cant connect the board to none GCS (it connects and disconnects repetidly). Is this guide intended for Cube Orange as well or not?