I'm wondering if TrackingTools estimates the linear and angular velocities and accelerations?
I found some protected variables related to velocities in the sample codes. But don't know how to access them.
I guess these variables are commonly used in many applications. It will save some hussle of building a filter if TT already have it.
Thanks!
Linear and Angular Velocity and Acceleration
-
- Posts: 1896
- Joined: Tue Feb 01, 2011 8:41 am
- Location: Corvallis, OR
Re: Linear and Angular Velocity and Acceleration
Which functions and variables are you referencing?
Re: Linear and Angular Velocity and Acceleration
In "vrpn_Tracker.h",
Can user access these variables?// Description of the next report to go out
vrpn_int32 d_sensor; // Current sensor
vrpn_float64 pos[3], d_quat[4]; // Current pose, (x,y,z), (qx,qy,qz,qw)
vrpn_float64 vel[3], vel_quat[4]; // Cur velocity and dQuat/vel_quat_dt
vrpn_float64 vel_quat_dt; // delta time (in secs) for vel_quat
vrpn_float64 acc[3], acc_quat[4]; // Cur accel and d2Quat/acc_quat_dt2
Re: Linear and Angular Velocity and Acceleration
How can user access the linear and rotational velocity and acceleration of a rigid body using TT?
Using this callback handler?
Using this callback handler?
A piece of example would help a lot. Thanks!// (un)Register a callback handler to handle an acceleration change
virtual int register_change_handler(void *userdata,
vrpn_TRACKERACCCHANGEHANDLER handler, vrpn_int32 sensor = vrpn_ALL_SENSORS);
virtual int unregister_change_handler(void *userdata,
vrpn_TRACKERACCCHANGEHANDLER handler, vrpn_int32 sensor = vrpn_ALL_SENSORS);
Re: Linear and Angular Velocity and Acceleration
You wouldn't want to use the callback handler. You basically will call TT_Update() and then you can get the rigid body's position and orientation from TT_TrackableLocation.
We don't calculate the linear and rotational velocity/acceleration for you so you'll need to perform the calculation yourself currently. However, you have the position & orientation so all the standard formulas and approaches for calculating these will work.
We don't calculate the linear and rotational velocity/acceleration for you so you'll need to perform the calculation yourself currently. However, you have the position & orientation so all the standard formulas and approaches for calculating these will work.