How To Control THETA 360 Degree Camera Via C++ for Robotics

Originally published at: How To Control THETA 360 Degree Camera Via C++ for Robotics - RICOH THETA Developer Community

THETA 360 degree cameras can be used to prototype live streamed vision for computer vision and industrial robotics uses. Live streaming functionality is built into the camera for most THETA models, and using a 360 degree camera can simplify traditional pan and tilt mechanisms that require multiple cameras and mechanical movement to adjust the cameras’ positions. With a 360 degree camera, the position of the camera does not change; the viewer can navigate within the 360 degree sphere to look left, right, up, down.

Thomas Krueger has worked with THETA V for use with robotics using live streaming and taking advantage of the 360 degrees views as a virtual pan and tilt unit. The THETA streams to a hardware platform. Thomas used both x86_64 Debian and the Jetson Nano.

Krueger used the libuvc-theta-sample. He reported it works well on x86_64 Debian but on the Nano it was very slow.

Krueger built a C++ library for controlling a THETA V using PTP, and a Virtual Pan and Tilt Unit (PTU). Both are provided publicly.

I recently started using a ThetaV also for robotics with live streaming (as a virtual pan and tilt unit). For the the real system automation and integration I just can not afford to push buttons so I scraped down ptpcam from libptp2 and thus started to build a c++ thetaV API using ptp… it is coarse and early stage, but I am happy to share the code. I can change modes, streaming works fine.

C++ library for dedicated control of a THETA V. The underlying mechanism is based on libptp and libusb. Krueger states that it is a work in progress. 

Project is intended to build a way use a 360 degree camera to have a single unit mounted on a robot and via software select which segment is streamed to the user. Full 4K 360 streaming is not realistic since bandwidth often restricted. This way we would not need a motorized unit. Krueger states that it is a work in progress.

There’s also an implementation of using gstreamer:

Full discussion in the community.

More Resources to

RICOH THETA X Introduction