first (successful) try with OptiTrak Motive

This commit is contained in:
Hartmut Seichter 2025-06-30 11:19:09 +02:00
parent f5b9ee9eea
commit de9a4990e5
3 changed files with 21 additions and 1 deletions

View file

@ -1,3 +1,18 @@
# Resources
- [vrpn-rs description of VRPN protocol](https://github.com/vrpn/vrpn-rs/blob/main/Protocol.md)
# Design
Allow for a session based design - data needs to be collected per block
and immediatly made available. Minimal or no internal state keeping!
- first collect names and ids of message_types and senders (stored in session)
- register listeners in session
- listeners inject captured data with signals
- keep naming "classic" ??? ... above session is a tracker with a sender with sensors

View file

@ -4,6 +4,7 @@
[node name="Node3D" type="Node3D"]
script = ExtResource("1_gxo8o")
vrpn_server = "212.201.64.122"
[connection signal="connected" from="." to="." method="_on_connected"]
[connection signal="data" from="." to="." method="_on_data"]

View file

@ -5,10 +5,14 @@ signal data(data:Array)
signal disconnected
signal error
@onready var _stream: StreamPeerTCP = StreamPeerTCP.new()
@export var vrpn_server : String = "localhost"
@export var vrpn_port : int = 3883
func _ready() -> void:
self.connect_to_host("127.0.0.1",3883)
self.connect_to_host(vrpn_server,vrpn_port)
func _process(delta: float) -> void:
var old_status = _stream.get_status()