Skip to content

Integration of virtual reality hardware and robot network tables to provide localization ground truth

Notifications You must be signed in to change notification settings

Team488/VR_NetworkTables2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VR_NetworkTables2024

This project provides for integration of virtual reality hardware and RoboRIO network tables. The objective of this integration is to provide a way of using VR hardware tracker technology to deliver an independent source of pose ground truth in the pursuit of better robot localization.

Hardware

This has been tested using a VR tracker from Tundra Labs (https://tundra-labs.com/products/additional-tracker). This is a 6 DOF tracker that works with SteamVR lighthouse technology.

Configuration

Here is a pip list from a known working environment
Package                  Version
------------------------ -----------
appdirs                  1.4.4
bcrypt                   4.2.0
cffi                     1.17.1
colorama                 0.4.6
contourpy                1.3.0
cryptography             43.0.1
cycler                   0.12.1
flexcache                0.3
flexparser               0.3.1
fonttools                4.53.1
iniconfig                2.0.0
kiwisolver               1.4.7
matplotlib               3.9.2
numpy                    2.1.1
openvr                   2.5.101
packaging                23.2
paramiko                 3.5.0
pillow                   10.4.0
Pint                     0.24.3
pip                      24.2
pluggy                   1.5.0
pycparser                2.22
pyfrc                    2024.0.1
PyNaCl                   1.5.0
pynetconsole             2.0.4
pyntcore                 2024.3.2.1
pyparsing                3.1.4
pytest                   8.3.3
pytest-reraise           2.1.2
python-dateutil          2.9.0.post0
robotpy                  2024.3.2.2
robotpy-cli              2024.0.0
robotpy-hal              2024.3.2.1
robotpy-halsim-gui       2024.3.2.1
robotpy-installer        2024.2.2
robotpy-wpilib-utilities 2024.1.0
robotpy-wpimath          2024.3.2.1
robotpy-wpinet           2024.3.2.1
robotpy-wpiutil          2024.3.2.1
setuptools               72.1.0
six                      1.16.0
tomli                    2.0.2
tomlkit                  0.13.2
typing_extensions        4.12.2
wheel                    0.43.0
wpilib                   2024.3.2.1

Execution

  • Plug-in lighthouse base stations and position them looking down on the tracker
  • Place the tracker in an area with line-of-sight to the base stations
  • plug the tracker dongle into the PC running the test (the code is currently hard-coded for the tracker/dongle combination without sticker labels)
  1. run tracker_test.py to read points from the tracker. Place the tracker in known FRC field coordinates and note the corresponding coordinates in each coordinate system.
  2. map the FRC coordinate system to the lighthouse coordinate system by running "Coordinate Transformations.ipynb" notebook and entering points read from the tracker via tracker_test.py and cooresponding points on the FRC field. This will provide the transformation matrix needed for mapping tracker coordinates to FRC field coordinates. Copy this matrix to tracker_test.py for use only during this session (the matrix values must be recalculated if the lighthouse base stations are moved).
  3. run the python robot simulator (py -3 -m robotpy sim). See https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/robot-simulation/introduction.html
  4. run tracker_test.py (with updated transformation matrix)
  5. run AdvantageScope
  • File->Connect to simulator
  • "+" Odometry view
  • drag pose to view

References

About

Integration of virtual reality hardware and robot network tables to provide localization ground truth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published