Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lighthouse Tracking Room Overview

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
christian.buzga
999 Views, 13 Replies

Lighthouse Tracking Room Overview

Hi guys,

 

unfortunately Valve removed the "room overview" for their lighthouse tracking system (long time ago). It was a pretty good function, to get an quick overview over all tracking components and their position/rotation. So you can quickly check, if something is "wrong" with your tracking system.

 

We have an implementation for this in Unity, but because you can not run two application that are "connected" to SteamVR at the same time, we would like to implement such a feature directly in VRED.

So we can access the position/rotation of the tracking devices, like HMD, trackers, controllers. What we are missing are the basestation(s). They are not in the list that we get from vrDeviceService.getConnectedVRDevices(). But I know, that SteamVR is normaly providing these, named as "tracking references".

 

Is there a way to get the position/rotation of the basestation also in VRED?

 

Thanks and best regards,

Christian

13 REPLIES 13
Message 2 of 14

Hi,

unfortunately it's currently not possible to access those with the VRED Python API. Any TrackingReference devices are ignored.

 

I'll add your request to access Lighthouses via API to our backlog. Thanks for the information about your use case, that helps.

 

Kind regards

Sinje

Message 3 of 14

Hi,

 

I have been trying to get a list of all the connected devices through VRED using the below code. But it always returns the value 0. Even when we have the Vive headsets, left and right controllers and trackers 1.0 connected and showing up in Steam VR. May I know what could be the reason? These trackers are from 2017. We updated the firmware on the trackers but still no results. I can't get the serial numbers or name of these devices printed in VRED. Any advice will be highly appreciated.

 

devices = vrDeviceService.getConnectedVRDevices()

print(len(devices))

 

Regards,

 

Sanju Mathew

Message 4 of 14

Hi,

Execute the code while OpenVR HMD mode is active in VRED, otherwise the devices will not show up.

 

Regards,

Dan

Message 5 of 14

Thank you! Now it works

Message 6 of 14

Hi,

 

I am trying to get the current position of the tracking device with the following code, but it says 

object has no attribute 'getTrackingOrigin'. May I know how to get the current position of the device? get tracking origin gives me the origin of the VRED grid in VR. I am trying to get the scene positioned and oriented in x, y, z based on the buck orientation. Each time I enter the VR orientation keeps changing. 

tracker_1 = vrDeviceService.getVRDevice("tracker-1")

tracker_1_origin = tracker_1.vrDeviceService.getTrackingOrigin()

print(origin)

 

Regards,

 

Sanju Mathew

Message 7 of 14

Hello,

 

Something like this should work...

tracker_1 = vrDeviceService.getVRDevice("tracker-1")
tracker_1_position = vrMathService.getTranslation(tracker_1.getNode().getWorldTransform())
print(tracker_1_position)
print(f"Z: {tracker_1_position.z():.2f}") # Print Z value rounded

Also, see related tutorial here by Christopher.

https://help.autodesk.com/view/VREDPRODUCTS/2025/ENU/?guid=9Tutorial-VREDPro

 

Message 8 of 14

Perfect! Thank you for the link to tutorial. Highly appreciate it!!

 

1) Is there a way to rotate the whole VR session by a certain angle (deg) in Z axis after doing a .setTrackingOrigin() to orient the data in a certain direction?

 

2) Also I am trying to run numpy. 'python.exe -m pip install numpy' as per the tutorial below.
https://help.autodesk.com/view/VREDPRODUCTS/2024/ENU/?guid=VRED_Python_Documentation_Python_API_V2_h...

But it gives me syntax error as below. Can it be run from Script editor or it has to be run in CMD?

Unable to convert:python.exe -m pip install numpy
File "<string>", line 1
python.exe -m pip install numpy
^^^
SyntaxError: invalid syntax

 

Regards,

 

Sanju Mathew

Message 9 of 14

Hi, i can answer the question 2:

2) Also I am trying to run numpy. 'python.exe -m pip install numpy' as per the tutorial below

To be sure to use the correct "Python.exe", add the full path for the Vred python, or add the vred python path to the windows "Path" environment variable.

 

Then you can use both via Cmd or script editor, but you should differentiate

cmd: "C:\Program Files\Autodesk\VREDPro-17.1\lib\python\python.exe" -m pip install numpy

to run it from the script editor: 

import subprocess

subprocess.check_call(['C:/Program Files/Autodesk/VREDPro-17.1/lib/python/python.exe', '-m', 'pip', 'install', numpy])

 

in both cases check the VredPro-xx.x version in the python path

 

Best

Chris

Christian Garimberti
Technical Manager and Visualization Enthusiast
Qs Informatica S.r.l. | Qs Infor S.r.l. | My Website
Facebook | Instagram | Youtube | LinkedIn

EESignature

Message 10 of 14

Try this to rotate the scene.
cam = vrCameraService.getActiveCamera()
cam.setTranslation(QVector3D(0, 0, 0))
cam.setRotationAsEuler(QVector3D(90, 0, 90))
Message 11 of 14

Thank you Christian and Daniel!!

 

We could setup everything the way we had planned. Highly appreciate your support without which we couldn't have accomplished it.

Message 12 of 14

Hmm.. somehow it's not installing it.. I am getting below error. while trying to import numpy.

 

Traceback (most recent call last):

File "<string>", line 1, in <module>

ModuleNotFoundError: No module named 'numpy'

Message 13 of 14

Hi, exactly which command have you written, where (windows cmd or vred terminal) and which version of vred are you using?

Best

Chris

Christian Garimberti
Technical Manager and Visualization Enthusiast
Qs Informatica S.r.l. | Qs Infor S.r.l. | My Website
Facebook | Instagram | Youtube | LinkedIn

EESignature

Message 14 of 14

I guess I had to restart VRED. Now it worked. CMD option worked. It says the requirement is already satisfied. I am using Autodesk VREDPro 2024.2. Thank you Christian!!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report