-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SteamVR module for tracking #779
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting I don't have a SteamVR, this review is somewhat limited to basic MAVProxy module functionality.
|
||
# send origin at 1Hz | ||
mav.mav.set_gps_global_origin_send(self.target_system, | ||
int(self.vr_settings.origin_lat*1.0e7), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this only had to be sent once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only has to be received once, I guess this is easier than trying to tell. This is completely left over from the Vicon stuff.
fix_type = 3 | ||
else: | ||
fix_type = 1 | ||
mav.mav.gps_input_send(time_us, 0, 0, gps_week_ms, gps_week, fix_type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does gps_input need to be sent if you're also sending global_vision_position_estimate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just gives the option, by default the gps stream rate is 0
I have made this a good deal more robust, stop and start work properly now, the only way I have found to break it is to shut steam vr while its being used. I think this is more due to issues with PyOpenVR than this. SteamVR does give a 'are you sure python still running' warning so I don't think its a disaster. |
This adds a module that reads in the pose from a SteamVR Tracker using PYopenVR. The tracker provides position, velocity, attitude and attitude rate at 144HZ. This is then dished out in GPS or VISION messages at a set rate.
https://youtu.be/P7J486V5__A
My first MAVProxy PR and also my first proper bash as Python so apologies for any mistakes.
I ended up using a OpenVR example code to go from the provided matrix to roll pitch and yaw. I couldn't workout the ordering to use the existing one.
I will do a better vid explaining how to setup in the next day or so.