Using USB API (MTP) with libghoto2 and Python bindings on MacOS, Raspberry Pi, Linux, ROS

I ran pydoc against the docstrings in pytheta.py

https://codetricity.github.io/multi_view_image_modified/

Trying to use PEP 257 Docstring Conventions as the example.

There’s also a nice article on docstrings on Real Python, a fairly well-known site.

The application currently uses print debugging. I’m thinking of switching to the modern recommended method using logging, as this is not a good way to do it.
I’m going to get involved in the switch after I finish another errand that needs to be done and discuss the future with my professor.

1 Like

@jcasman, there’s a few articles on logging here:

We should test the individual functions on Python 3.x (maybe 3.8 or 3.9) and Ubuntu 20.04.

I only tested the individual functions to work with Ubuntu 16.04 and Python 2.7. I can’t get multiple cameras to work on any system.

I think this library can be quite useful in the future if we make it more general purpose for modern systems. Hopefully, @jcasman and I can find a way to help. However, even if we can’t figure out how to cooperate with pull requests, we are learning about gphoto2 and Python.

@NaokiSato102 I have just submitted a pull request: https://github.com/open-rdc/multi_view_image/pull/26

Craig and I added more information to the README.md file. This should help the community understand what environment is being run.

Using pydocs, we built html documentation from the docstrings. This is also to help the community. Right now, it is on a temporary URL that you can view. Please change it to a permanent URL if you want publish it with GitHub Pages.

And we added English translation of the comments for pytheta.py. This should help people in the community who do not read Japanese.

Great work on the repo! Hoping this pull request will add some useful information for the community.

2 Likes

I saw your pull request! The aforementioned work to be done is done. So I’m analyzing the differences for the merge. It’s a bit of a challenge because I’m actually not that well versed in the use of Git. I’ve been on the sending side of data when we work together, but this is my first time to be on the accepting side.

2 Likes

I think we’re all learning how to use Git. This is good practice for everyone.

Thanks for helping us learn more about GitHub by practicing with us.

1 Like

We’re learning, too. Let’s use it together and learn together!

Thanks to all of you, I have successfully submitted my graduation thesis and am now just waiting for graduation. I have expressed my gratitude to craig and others in the acknowledgements of my thesis. I would like to thank them again here. Thank you very much.

As for the system I was developing, upon graduation, it became difficult to develop it because Theta is no longer operational because it belongs to the lab. I would like to continue the development of the system, but what should I do?

2 Likes

@NaokiSato102, first congratulations on your graduation. It’s a big accomplishment under tough conditions for education. Please feel free to send us a picture of your graduation ceremony. :slight_smile:

If you’re in Japan, we do not have any program from .guide to offer developer discounts or loaner cameras for developers.

Due to the way our sponsorship with RICOH works, we can have some ability to help developers in the US with equipment. This is primarily due to shipping logistics.

My recommendation is to look for a used THETA V in Japan. Although all cameras from the S onward work with the USB API, the V also has the ability to work with plug-in development and live streaming. If you get the S, there are some differences with the WebAPI, but it will work. If budget is tight, the S will be cheaper, but won’t have all the features as the V.

1 Like

Congratulations @NaokiSato102 ! That’s a big deal during these times. Well done!

2 Likes

So it has been a while but I updated my firmware to 3.60.1 and my original code no longer works.

camera = gp.Camera()
camera_config = camera.get_config()
other_config = camera_config.get_child_by_name('other')
exposure_program_mode = other_config.get_child_by_name('500e')
gphoto2.GPhoto2Error: [-2] Bad parameters

Has anyone figured this one out? It seems that many of the ‘other’ config options have disappeared. I would like to create a manual exposure (setting fstop, shutter speed, and aperture) using the latest firmware.

…answering my own questions, after getting the camera I added “camera.wait_for_event(100)” to fix the issue.

1 Like

Oh, so does it work now with the wait for event?

Is the “100” a specific parameter or a amount of time, like 100ms?