Support for arm64 on the Ricoh C++ SDK?

I have a Ricoh connected to a Jetson TX2 board and am using libptp to initiate data capture. This is a pain as it is using old c code. I noticed that there is an armv7 c++ library in the portal, but the nvidia boards run arm64. Is there plans to compile the sdk for arm64?

armv7 binaries usually run just fine on arm64. Did you give it a try? Were there some failed link dependencies (check with ldd).

I appreciate the response. Yes, I have indeed tried to, but this is on an Nvidia Jetson Tx2 board which is aarch64-linux-gnu. Even though I can compile by adding this config to the CMake files, it will fail to link to libRicohCameraSDKCpp.so for being in the wrong architecture.

ubuntu@tegra-ubuntu:~/Downloads/ricoh-camera-usb-sdk-cpp-linux-armv7l-1.1.0/lib/armv7l$ ldd libRicohCameraSDKCpp.so 
	not a dynamic executable

ubuntu@tegra-ubuntu:~/Downloads/ricoh-camera-usb-sdk-cpp-linux-armv7l-1.1.0/samples/cli/build$ cmake ..
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- arm64
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/Downloads/ricoh-camera-usb-sdk-cpp-linux-armv7l-1.1.0/samples/cli/build
ubuntu@tegra-ubuntu:~/Downloads/ricoh-camera-usb-sdk-cpp-linux-armv7l-1.1.0/samples/cli/build$ make
Scanning dependencies of target cli
[ 50%] Building CXX object CMakeFiles/cli.dir/cli.cpp.o
[100%] Linking CXX executable cli
/home/ubuntu/Downloads/ricoh-camera-usb-sdk-cpp-linux-armv7l-1.1.0/lib/armv7l/libRicohCameraSDKCpp.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
CMakeFiles/cli.dir/build.make:96: recipe for target 'cli' failed
make[2]: *** [cli] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/cli.dir/all' failed
make[1]: *** [CMakeFiles/cli.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Ahh I see what you’re trying. I think the main issue is that cmake is auto-detecting your arch and trying to build for arm64. So if you trying to link to an armv7 lib you’ll need to force it to build the source for armv7 instead.

If you’re compiling on an arm device, it might be enough to just add CMAKE_CXX_FLAGS "-m32" to the cmake file. Or you may need to specifically do something like add_compile_options("-march=armv7-a"). Sorry, my cmake-fu is not that great, may need to dig into some stackoverflow posts to get specifics but I think this would at least get you compiling and linking.

Good luck.

You should use gphoto2 instead of ptpcam. On raspbian I works great and it is available with apt-get (except for shutterspeed on theta V witch need some code modification and a fresh compilation).
I presume it works on TX2 out of the box (I have a jetson nano board but i didn’t try)

Hugues

1 Like

@Jeston_Furqueron, can you post the link to the C++ SDK that you are using? I’m assuming that you didn’t get this from the THETA developers section of the developer site. It’s likely managed by a different development team. I just want to make sure we’re looking at the same SDK.

@Hugues, are you looking at NVIDIA Jetson as a possible platform for your FOX SEWER ROVER? I recently saw a demo of 4K live streaming using Jetson and a THETA. The demo should be able to both stream to the Jetson board and save to storage on Jetson simultaneously. The developer wrote a usermode Linux driver to get it working. The Jetson board could serve a similar function to what you have running on the Raspberry Pi using MotionJPEG and three.js

The Jetson boards have 4K H.264 hardware decoding and encoding.
The Raspberry Pi 4 encoding with H.264 is limited to 2K.

Sure thing, the SDK I got was listed as the RICOH Camera USB SDK for C++.

1 Like

Thanks for this information. I am checking to see if that SDK will be updated to support the RICOH THETA. I believe the picture is confusing because it shows a THETA. However, I do not think that SDK actually supports the RICOH THETA.

I think it is clearer if they show two DSLRs connected to the computer on the SDK download page instead of the THETA. There is a THETA section right below that. However, the THETA section does not have a USB API SDK.

I’m trying to ask some people I know at RICOH to get an unofficial answer on this. I believe there may be a separate “community” open source set of examples on GitHub for the THETA in the future.

Update October 28, 2019

I confirmed with some people that are familiar with RICOH Camera USB SDK for C++ that this SDK does not work with the RICOH THETA. There are no plans to support the RICOH THETA with that SDK. It is only for DSLR cameras.

Most people are using libptp2, which is fairly easy to get running on Linux. I recommend that people continue to build their applications using libptp and something like ptpcam or equivalent.

Although not many people have built Windows Kiosks with the THETA USB API, I have heard that the MTP extensions and the MTP examples on the Microsoft site work.

There appears to be a path forward for Windows kiosk or business-style desktop applications that use a USB cable to control the THETA in addition to small-board Linux computers like the Raspberry Pi and Nvidia Jetson.

To date, no one has used an Arduino to control the USB API. It looks difficult.