VR tracker Position&Orientation- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: VR tracker Position&Orientation (/Thread-VR-tracker-Position-Orientation) |
VR tracker Position&Orientation-gb2njoa-02-22-2023 hello, 我am currently developing a new solution for machine learning. 我use an HTC Tracker 3.0 and SteamVr without a headset. 我linked SteamVr and RoboDK so I see my cameras (base station) and my tracker in space 我positioned a frame in order to overlay my CAO Camera and my SteamVr generated camera. 我t works great, the simulation tracker item follows the real movement ! Now I want to get the position/orientation of the tracker in space ! (if possible with a python script ) 我don't see any item(tracker or camera) created in the tree so how can I collect this informations ? Thanks. RE: VR tracker Position&Orientation-Albert-02-22-2023 You can measure the pose of a tracker using the RoboDK API and MeasurePose. The following function can help you better understand how to use it as you can also read the button state and take the averaged measurement (helps reduce noise).
Code:
TARGET_TYPE_NONE=-1 # The same as TARGET_TYPE_PROBE
You can read the state of the buttons using a bitmask. Also, you can trigger the identification of a tracker to assign it as a Handheld probe, Generic tracker or robot tool by calling the IdentifyTracker command:
Code:
RDK.Command("IdentifyTracker")
RE: VR tracker Position&Orientation-Albert-02-22-2023 Another topic, we support using HTC Vive trackers and Valve Base stations as a measurement system with RoboDK TwinTrack: //www.sinclairbody.com/TwinTrack Let us know if you need more information. We have not tested the HTC Vive Trackers v3 yet but the new improvements look promising. RE: VR tracker Position&Orientation-gb2njoa-02-23-2023 Thanks for your reply ! 我tried your code.
Code:
RDK.Command("IdentifyTracker")
And when I start the code to measure the pose, an exception occurred :
Code:
pose, data = RDK.MeasurePose(target, time_avg_ms)
Thanks. RE: VR tracker Position&Orientation-Albert-02-23-2023 我t is better if you can contact us by email so we can allow you to use RoboDK for this purpose. |