Modifying ODAS servos example


Hi there,

So, I would like to work with ODAS, therefore I followed this tutorial : . Instead of using the regular demo, I used the one shown on YT with the servos.

I would like to modify this example in order to control a motor driver for a car which will go to a sound source thanks to a PID position controler (using the angles given by the program).

My question is quite simple, how can I modify the given example ?
As you can see, there is no library with the code (.cpp)

And so when I try to modify it and compile it with Geany, I get an error message saying that the header json.h wasnt found. Which is normal because as you can see on the first picture, there is nothing else than the code demo (.cpp)

Thank you :smiley:


@Marwaladeen, did you download all the required dependencies?

sudo apt-get install g++ git cmake
sudo apt-get install libfftw3-dev
sudo apt-get install libconfig-dev
sudo apt-get install libasound2-dev
sudo apt install libjson-c-dev

The final package, libjson-c-dev, downloads the json.h file in question.

To edit the example, you have to edit the matrix-odas.cpp file in ~/odas/demos/matrix-demos, then navigate to the ~/odas/build folder and run


in the terminal to re-build the cpp executable.

Hope this helps!


Well, json.h was not installed !.. thank you :smiley: