# Trigger Headset-Position-Save on Controller-Botton in Python

**URL:** https://discourse.paraview.org/t/trigger-headset-position-save-on-controller-botton-in-python/14562
**Category:** VR/AR
**Created:** [May 6, 2024, 11:50am UTC](https://discourse.paraview.org/t/trigger-headset-position-save-on-controller-botton-in-python/14562 "2024-05-06T11:50:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Wagner](https://discourse.paraview.org/user_avatar/discourse.paraview.org/wagner/32/14314_2.png) [@Wagner](https://discourse.paraview.org/u/Wagner)
#### Post date: [May 6, 2024, 11:50am UTC](https://discourse.paraview.org/t/trigger-headset-position-save-on-controller-botton-in-python/14562/1 "2024-05-06T11:50:05Z")

</div>

Dear all,

I’m looking to trigger capture the Camera-Position in the VivePro2-Headset on the Push of a Controller-Button to export it to file/Desktop.

Is there already a way to do this? I haven’t found one so far.

I was therefore thinking of writing a python script for it, but hit a snag of how to listen for the Controller-button. Do you have any suggestions on how to do that or where to look?

Thank you!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 6, 2024, 11:53am UTC](https://discourse.paraview.org/t/trigger-headset-position-save-on-controller-botton-in-python/14562/2 "2024-05-06T11:53:43Z")

</div>

Hi @Wagner

There is already a mechanism to save camera pose in the XRInterface plugin, by pressing the “SavePose” button. It even saves them in the statefile, you can find them in the UI and reload them easily using the trigger on the controller.

Best,

---

<div class="post-metadata">

### Author: ![Wagner](https://discourse.paraview.org/user_avatar/discourse.paraview.org/wagner/32/14314_2.png) [@Wagner](https://discourse.paraview.org/u/Wagner)
#### Post date: [May 8, 2024, 10:15am UTC](https://discourse.paraview.org/t/trigger-headset-position-save-on-controller-botton-in-python/14562/3 "2024-05-08T10:15:48Z")

</div>

Hi @mwestphal,

Yes, I did find this mechanism and I have been using it.

I didn’t describe what I am looking for well.  
I would like to save the camera pose in VR, be able to load the pose with both the camera in VR and in the desktop application and create a picture of the in-headset view. Ideally, just pressing one button.

With the save pose mechanism it is possible to save the pose in VR and load it there.  
I haven’t found a mechanism to load the poses on the desktop for quick review or when no VR-HMD is on hand.  
I have tried to use the export as skybox for the picture, but I believe the orientation of the skybox is along the grid and not tied to the view direction of the camera. Therefore, I am currently using the Headset-mechanisms (or screen capture over the desktop screen with a window of the inHMD view), but it’s rather tedious.

I have also found that I tend to move my head around when working with the navigation panel, so the focal point of my poses tend to by somewhat off.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 14, 2024, 7:25am UTC](https://discourse.paraview.org/t/trigger-headset-position-save-on-controller-botton-in-python/14562/4 "2024-05-14T07:25:17Z")

</div>

> [@Wagner](#):
>
> I haven’t found a mechanism to load the poses on the desktop for quick review or when no VR-HMD is on hand.

Indeed, this should be available but is not. It could be added and linked with the desktop camera location toolbar mechanism.

Do not hesitate to reach out to Kitware if you can contribute to this feature!

> [@How are features and bug fixes incorporated into ParaView?](https://discourse.paraview.org/t/how-are-features-and-bug-fixes-incorporated-into-paraview/4735):
>
> As with all open source projects, adding features and fixing bugs takes developer effort. That effort may originate from volunteer community contributors, or through paid professional services offered by companies like [Kitware](https://www.kitware.com). Features and bug fixes are prioritized by the needs of contributing community members and by professional services customers. Note that contributions are vetted by a rigorous community review and testing process; therefore it is recommended that significant changes are d…

---

<div class="post-metadata">

### Author: ![Wagner](https://discourse.paraview.org/user_avatar/discourse.paraview.org/wagner/32/14314_2.png) [@Wagner](https://discourse.paraview.org/u/Wagner)
#### Post date: [May 22, 2024, 3:04pm UTC](https://discourse.paraview.org/t/trigger-headset-position-save-on-controller-botton-in-python/14562/5 "2024-05-22T15:04:48Z")

</div>

OK. Thank you.
