Manual Focus - client_ipc_rc.py
Hi!
I want to define the focus of the hololens 2 manually, because at the moment it seems to focus more on the background than in the object I hold. I found through the readme file that the /client_ipc_rc.py script is the one responsible for defining that, however I have a few questions.
1 - When I run the script, it says the PV subsystem is turned off, thus not applying the changes to the focus I want. How can I turn it on?
2 - When I manage to run the script, does it apply the focus settings from then on or do these settings reset?
3 - I would like to save frames from the hololens 2, which I am already doing via the /client_stream_pv.py script. Is it possible to run the /client_ipc_rc.py file to define the focus settings and then run the /client_stream_pv.py script to gather data with those settings? If that isn't possible, how would you suggest gathering frames with the desired focus settings?
Hello,
hl2ss_lnm.start_subsystem_pv turns on the PV subsystem.
The focus (and other PV) settings persist until hl2ss_lnm.stop_subsystem_pv is called. After that, all PV settings are reset.
You can add this code fragment to client_stream_pv.py right after hl2ss_lnm.start_subsystem_pv to set the focus value:
client_rc = hl2ss_lnm.ipc_rc(host, hl2ss.IPCPort.REMOTE_CONFIGURATION)
client_rc.open()
client_rc.wait_for_pv_subsystem(True)
client_rc.set_pv_focus(hl2ss.PV_FocusMode.Manual, hl2ss.PV_AutoFocusRange.Normal, hl2ss.PV_ManualFocusDistance.Infinity, focus_value, hl2ss.PV_DriverFallback.Disable)
client_rc.close()
focus value must be in the range [170,10000].