sudo /etc/init.d/ethercat restart
/opt/etherlab/bin/ethercat master
/opt/etherlab/bin/ethercat slaves -v
gcc dc_test_no_thread.c -o dc_test_no_thread -I/opt/etherlab/include -L/opt/etherlab/lib -lethercat -Wl,--rpath -Wl,/opt/etherlab/lib
sudo ./dc_test_no_thread > histogram_no_thread.csv
python plot_no_thread.py
gcc dc_test_thread.c -lpthread -o dc_test_thread -I/opt/etherlab/include -L/opt/etherlab/lib -lethercat -Wl,--rpath -Wl,/opt/etherlab/lib
sudo ./dc_test_thread > histogram_thread.csv
python plot_thread.py
source /home/hiep/linuxcnc-dev/scripts/rip-environment
g++ -c -fPIC -L/usr/local/lib -I. -I/usr/local/include -I/usr/include/eigen3 -lorocos-kdl orocos_cnc.cpp -o orocos_cnc.o
g++ -fPIC -shared orocos_cnc.o -o liborocos_cnc.so
gcc dc_test_thread_orocos.c -lpthread -o dc_test_thread_orocos -I/opt/etherlab/include -L/opt/etherlab/lib -L. -lethercat -lorocos_cnc -lorocos-kdl -Wl,-rpath,/opt/etherlab/lib -Wl,-rpath,/home/hiep/hiep_igh/thread_id7dof
sudo ./dc_test_thread_orocos > ../histogram_thread_orocos.csv
python plot_thread_orocos.py
gcc etherlab_thread_orocos.c -lpthread -o etherlab_thread_orocos -I. -I/opt/etherlab/include -L/opt/etherlab/lib -L. -lethercat -lorocos_cnc -lorocos-kdl -Wl,-rpath,/opt/etherlab/lib -Wl,-rpath,/home/hiep/hiep_igh/thread_id7dof
sudo ./etherlab_thread_orocos