OSVR-fusion icon indicating copy to clipboard operation
OSVR-fusion copied to clipboard

Tracker Alignment -- make permanent?

Open maso27 opened this issue 8 years ago • 5 comments

I'm using this with an OSVR HDK 1.4, to integrate the kinect for positional tracking.

I've found that the osvr_reset_yaw.exe alignment technique only works for the duration of the open server, then is discarded.

Is there a way that I can make my 1.7 radian adjustment to the y-axis permanent, so that I don't have to open and run this every time?

maso27 avatar Feb 01 '17 16:02 maso27

I think you can do this in osvr_server_config, if you research how to rotate axes in there.

I'm surprised it's always the same offset though, mine's always different

simlrh avatar Feb 01 '17 17:02 simlrh

On second thought I don't think you can put transforms in this plugin's options, so I don't think it's possible to make it permanent.

The plan is to copy the code from osvr_reset_yaw into this plugin so it can do it's own alignment, but I don't have any time for VR at the moment

simlrh avatar Feb 01 '17 17:02 simlrh

Mine varies a bit, but not by more than .2 radians.

And thanks for the work you've done on this! It's really cool. Hopefully the other things that take your time are enjoyable.

I'm considering a wacky lazy hack of mounting my kinect 1.7 radians away from my monitor :)

maso27 avatar Feb 01 '17 17:02 maso27

Update: I worked out what's needed in the osvr_server_config file to set a consistent offset.

I had to add this block after the "drivers" block:

"routes": [ {
	"destination": "/me/head",
	"source": {
		"child": {
			"changeBasis" : {
				"x" : "-x",
				"y" : "-z",
				"z" : "y"
			},
			"child" : "/com_osvr_Multiserver/OSVRHackerDevKitPrediction0/tracker/0"
		},
		"rotate" : {
			"axis" : "x",
			"degrees" : 90
		}
	},
	"postrotate" : {
		"axis" : "y",
		"radians" : 1.7
	},
	"resetYaw" : true
} ],

It's the "postrotate" piece that's important.

maso27 avatar Feb 04 '17 20:02 maso27

I'm going to leave this open to remind me to actually add the automatic calibration

simlrh avatar Feb 04 '17 21:02 simlrh