A Fusion360 add-in for generating SteamVR Tracking JSON files from 3D CAD Data
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Resources/Fusion360_SteamVR_Json
images
Fusion360CommandBase.py
Fusion360_SteamVR_Json.manifest
Fusion360_SteamVR_Json.py
LICENSE
README.md

README.md

Fusion360_SteamVR_Json

A Fusion360 add-in for generating SteamVR Tracking JSON files from 3D CAD Data

Required software

  • Autodesk Fusion360

Installation Instructions:

  1. Clone this repository or download .zip and extract to: C:\Users<your user name>\AppData\Roaming\Autodesk\Autodesk Fusion 360\API\AddIns\
  2. If Fusion360 is open, close the software
  3. Launch Fusion360
  4. A new command should appear in the "Model" Panel under "ADD-INS" called "Generate SteamVR JSON (Triad Semiconductor)"

Usage Insturctions

This script will generate a steamVR sensor definintion JSON file based on ConstructionPoints and ConstructionAxes that are added to a solid model.

For example, consider the following 3D model for the HTC Vive Tracker: Picture of Tracker Model in Fusion360

If we wanted to generate a JSON file for one sensor location, we would do the following:

  1. Select CONSTRUCT>Point at Center of Circle/Sphere/Torus Step 1
  2. Select the Sensor Aperture circle where the center point should be placed Step 2
  3. A point will appear in the center of the circle (yellow arrow), you will also see a new entry in the heirarchy Browser (green arrow) Step 3 Note: In this example, the point is called "Point1", this point will correlate to sensor 0 in the json channel map
  4. Select CONSTRUCT>Axis Through Cylinder/Cone/Torus Step 4
  5. Select the Cone surronding the Sensor Aperture Step 5
  6. An Axis will appear in the center of the cone (yellow arrow), you will also see a new entry in the heirarchy Browser (green arrow) Step 6 Note: In this example, the axis is called "Axis1", this vector will correlate to sensor 0 in the json channel map
  7. The sensor location is now specified by the point in Step 3 and the normal vector is specified by the Axis created in step 6, we may now test this by genearting a JSON file, to do this, select ADD-INS>Generate SteamVR JSON (Triad Semiconductor) Step 7
  8. The Script will automatically detect each construction point and axis, match them based on index and generate a JSON file where each pair is mapped to a channel of index-1 Step 8
  9. To add more sensors to the JSON file, repeat step 1 through step 6 for each sensor in the channel map
  10. After doing this N more times for each sensor, your model may look like this: Step 10
  11. If we regenerate the JSON per step 7, the following file is generated: Step 11
  12. When you are satisfied with your JSON file, you may File>Save As in your text editor