Interesting. I copied the c code from the TK1 board over to a Raspberry Pi, compiled it there, and it runs fine, main_pendulum solves successfully, just as it does on the desktop. To double check, I deleted acados from both boards, pulled a fresh version from the master branch, and recompiled on both using the commands
git clone https://github.com/acados/acados.git
cd acados
git submodule update --recursive --init
mkdir -p build
cd build
cmake ..
make install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ubuntu/acados/lib
export ACADOS_INSTALL_DIR=/home/ubuntu/acados/
Cmake reported Detected target GENERIC
in both cases. Then I went back to my generated c code folder, and used make clean
. In the Makefile I set
INCLUDE_PATH = /home/ubuntu/acados//include
LIB_PATH = /home/ubuntu/acados//lib
on the TK1, and
INCLUDE_PATH = /home/pi/acados//include
LIB_PATH = /home/pi/acados//lib
on the Pi.
The other change I made to the Makefiles on both platforms is to add -std=c99 to the ACADOS_FLAGS at the top. Otherwise I got the error
main_pendulum.c: In function ‘main’: main_pendulum.c:107:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
Then I ran make
, ./main_pendulum
, and got the same outputs described above.
acados_solve(): SUCCESS!
on the Pi.
acados_solve() failed with status 2.
on the TK1
Both boards return armv7l to uname -i
, which I believe is 32 bit.
The Pi 3 is running Raspian jessie, cmake 3.6.2, and gcc 4.9.2
The TK1 is running Ubuntu 14.04.6, cmake 3.17.0, and gcc 4.8.4
It’s not essential that it works on the TK1, it was just the first board I had around to test on. However, I am still curious why it would work on one and not the other? It would be good to know for future reference if there are limitations on what I can run this on.