Running Chai3D on raspberry pi
I am trying to do a project in haptics using a custom designed haptic device. I am planning to use raspberry pi as an interface/ platform for running Chai3D. I just want to know whether it is possible for running Chai3D on raspberry pi. If so, is there a successful venture of its trial?
If not, is it possible to use Arduino?
Thank you in advance.
Compiling CHAI3D is probably not a problem. All you would need to do is write a class that supports your haptic device. The template class/file to look at is the following: "src/CMyCustomDevice.cpp"
Let us know if you have anything (image/movie) to share!
I just set up my Raspberry Pi 3 Model B with raspbian OS to compile chai3d. I used the multiplatform 3.2.0 for this.
Upon running the following,
$ cd /path/to/chai3d $ cmake . $ make all
[ 0%] Building CXX object CMakeFiles/chai3d.dir/src/files/CFileModelOBJ.cpp.o *** Error in `/usr/bin/c++': double free or corruption (top): 0x016f7d70 *** CMakeFiles/chai3d.dir/build.make:54: recipe for target 'CMakeFiles/chai3d.dir/src/files/CFileModelOBJ.cpp.o' failed make: *** [CMakeFiles/chai3d.dir/src/files/CFileModelOBJ.cpp.o] Aborted CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/chai3d.dir/all' failed make: *** [CMakeFiles/chai3d.dir/all] Error 2 Makefile:76: recipe for target 'all' failed make: *** [all] Error 2
Here's some diagnostic information about the RPi,
Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux
g++ (Raspbian 4.9.2-10) 4.9.2
Does anyone have an idea what the issue might be?
I did some googling, and this seems to be a problem with configure/cmake step, because I'm compiling on an ARM CPU some flags need to be changed/added.
A similar error was found here:
I will try the fix and post my result!
In case that helps, I was able to cross-compile the CHAI3D library for ARM (from Ubuntu 16.04) using gcc-4.9.3 and the Makefiles version of CHAI3D (not CMake), by running the following command:
make CC=arm-linux-gnueabihf-gcc-4.9 CXX=arm-linux-gnueabihf-g++-4.9 ARCH=armv7 lib
// #define HAVE_CPUID_H
hi,I am ok to use make version of chai3d 3.2.0 and
1- modify the external/openal/include/alConfig.h file
2- use make CC=arm-linux-gnueabihf-gcc-4.9 CXX=arm-linux-gnueabihf-g++-4.9 ARCH=armv7
but when i do that I have the same error like cmake (with few other modifications change build options
-march=native by -mcpu=cortex-a53 -mfpu=neon-vfpv4 in cmakelist, and get all the packages needed and missing on my jessie distribution),
usr/bin/ld did not found -ldrd !!!!
But the libdrd.a was in the external/DHD/lib, i presume its a 64bits/32bits library x86 and not a ARM library, How can I have this ARM 32bits library version
Does anyone have an idea for this issue? Is anybody try to build drd ARM 32 bits?