HL2-DINO / HL2-DINO/DINO-Unity

Experimental Support for Tracking Tools with Passive Spherical Markers

Open
#8 3 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
No language data
Stars
21
Forks
8
PR merge metrics
No merged PRs in 30d

Description

After a couple of different issues were raised about this topic, I tried to add some very quick modifications to enable support for spherical passive markers under the [`experimental`](https://github.com/HL2-DINO/DINO-DLL/tree/experimental) branch of DINO-DLL.

To use the new modifications you should follow these instructions:

### 1) Fetch updates and rebuild DINO-DLL

``` bash
## clone repo if you don't have it already
# git clone https://github.com/HL2-DINO/DINO-DLL
cd DINO-DLL
git fetch
git pull
git checkout experimental
```

- Open the `.sln` file. build for `Release`, `ARM64`.
- Copy your new `HL2DinoPlugin.dll` & `HL2DinoPlugin.winmd` from `DINO-DLL/ARM64/Release/HL2DinoPlugin`
- Paste into the DINO-Unity folder so it's inside `Assets/Plugins/WSA`.

### 2) Modify `DinoToolsConfig.json`

The only change in DINO-Unity required is to modify the `.json` file used to construct your Unity project. For a tracked-tool inside the `tools` array of the file, you can now add a new key-value pair to describe the spherical marker radius.

``` json
{
"fileSettings": {"units" : "m"},
"tools":
[
{
"name": "Stylus",
"id": 8,
"coordinates":
[
["0","0","0"],
["0","0.07","0"],
["0","0.13701","0"],
["-0.03939","0.09175","0"],
["0.04704","0.09216","0"]
],
"marker_radius_m" : 0.0056
}
]
}

```

> [!IMPORTANT]
> This should be the radius of the passive spheres attached to the tool, in _**metres**_.

> [!TIP]
> A radius value of `0` should be used for flat markers. If this field is not specified for a tool in the `.json` file, then the code in `DINO-DLL` will automatically fill this field to be 0.

Rebuild DINO-Unity as instructed in the README (e.g. [see instructions](https://github.com/HL2-DINO/DINO-Unity/tree/unity-21?tab=readme-ov-file#getting-started) for the `unity-21` branch).

---

These changes were made relatively quickly, so please do review the new code in `DINO-DLL` yourself.

Effectively, the main change made is that when trying to associate detected marker-blobs with tools, you iteratively try out different marker radii specified in the `config.json` when trying to compute pose for different tools.

It's certainly considered an experimental and slightly unstable addition, as I haven't been able to robustly test it, and the code logic could be implemented in a more elegant way, so it has not been merged with the main branch just yet. Feedback is welcome!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the experimental branch changes in DINO-DLL and the DinoToolsConfig.json marker_radius_m example, then follow the README build instructions for DINO-Unity. Done means the spherical-marker support has been reviewed and tested, including the documented zero-radius behavior for flat markers, with the remaining stability concerns addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
unity
Domain
ar-vr-xr
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.