CHAI3DCHAI3D

normal Running Chai3D on raspberry pi

More
07 Feb 2017 16:53 #1

Hello

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.

Please Log in or Create an account to join the conversation.

More
08 Feb 2017 21:29 #2

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!

Please Log in or Create an account to join the conversation.

More
17 Feb 2017 15:24 #3

Hello!

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
make threw an error:
[  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[2]: *** [CMakeFiles/chai3d.dir/src/files/CFileModelOBJ.cpp.o] Aborted
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/chai3d.dir/all' failed
make[1]: *** [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,
uname -a
Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux
g++ --version
g++ (Raspbian 4.9.2-10) 4.9.2

Does anyone have an idea what the issue might be?

Thanks,
Ram

Please Log in or Create an account to join the conversation.

More
17 Feb 2017 15:37 #4

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:
github.com/Motion-Project/motion/issues/104

I will try the fix and post my result!

Please Log in or Create an account to join the conversation.

More
24 Feb 2017 12:01 #5

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
The only change required was commenting out the following line in external/openal/include/alConfig.h:
// #define HAVE_CPUID_H

Please Log in or Create an account to join the conversation.

More
16 Dec 2017 17:35 #6

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),

"escamotage incompatible"
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?

Thanks

Please Log in or Create an account to join the conversation.