|
| | vrpn_Tracker_WiimoteHead (const char *name, vrpn_Connection *trackercon, const char *wiimote, float update_rate, float led_spacing=0.145) |
| | constructor
|
| virtual | ~vrpn_Tracker_WiimoteHead () |
| | destructor
|
| virtual void | reset () |
| | reset pose, gravity transform, and cached points and gravity
|
| void | setup_wiimote () |
| | set up connection to wiimote-like analog device
|
| virtual void | mainloop () |
| | VRPN mainloop function
|
| void | update_pose () |
| | function to drive the full pose update process
|
| void | report () |
| | Pack and send tracker report
|
|
| vrpn_Tracker (const char *name, vrpn_Connection *c=NULL, const char *tracker_cfg_file_name=NULL) |
|
int | read_config_file (FILE *config_file, const char *tracker_name) |
|
void | print_latest_report (void) |
|
int | register_server_handlers (void) |
|
void | get_local_t2r (vrpn_float64 *vec, vrpn_float64 *quat) |
|
void | get_local_u2s (vrpn_int32 sensor, vrpn_float64 *vec, vrpn_float64 *quat) |
| | vrpn_BaseClass (const char *name, vrpn_Connection *c=NULL) |
| vrpn_Connection * | connectionPtr () |
| | Returns a pointer to the connection this object is using
|
|
| void | _update_gravity_moving_avg () |
| | based on cached gravity data, use a moving average to update the tracker's stored gravity transform.
|
| void | _update_2_LED_pose (q_xyz_quat_type &newPose) |
| | Create tracker-relative pose estimate based on sensor location of 2 tracked points.
|
| void | _update_flip_state () |
| | If flip state is unknown, set flip state appropriately.
|
| void | _convert_pose_to_tracker () |
| | Set the vrpn_Tracker position and rotation to that indicated by our d_currentPose;
|
| void | _reset_gravity () |
| | reset gravity transform and cached gravity vectors
|
| void | _reset_points () |
| | reset cached points, point count, and flip state,
|
| void | _reset_pose () |
| | reset current pose, last report time, and tracker pose
|
| bool | _should_report (double elapsedInterval) const |
| | return true if we have new data or max time elapsed
|
| bool | _have_gravity () const |
| | return true if our gravity values look like real data
|
|
bool | ensure_enough_unit2sensors (unsigned num) |
| virtual int | register_types (void) |
|
virtual int | encode_to (char *buf) |
|
virtual int | encode_vel_to (char *buf) |
|
virtual int | encode_acc_to (char *buf) |
|
virtual int | encode_tracker2room_to (char *buf) |
|
virtual int | encode_unit2sensor_to (char *buf) |
|
virtual int | encode_workspace_to (char *buf) |
| virtual int | init (void) |
| virtual int | register_senders (void) |
| int | register_autodeleted_handler (vrpn_int32 type, vrpn_MESSAGEHANDLER handler, void *userdata, vrpn_int32 sender=vrpn_ANY_SENDER) |
| int | send_text_message (const char *msg, struct timeval timestamp, vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL, vrpn_uint32 level=0) |
| | Sends a NULL-terminated text message from the device d_sender_id
|
| SendTextMessageBoundCall | send_text_message (vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL) |
| void | server_mainloop (void) |
| void | client_mainloop (void) |
|
| const char * | d_name |
| | Tracker device name
|
| const double | d_update_interval |
| | maximum time between updates, in seconds
|
| const double | d_blobDistance |
| | distance between LEDs on glasses, in meters
|
| FlipState | d_flipState |
| | Whether we need to flip the order of the tracked points before calculating a pose.
|
| struct timeval | d_prevtime |
| | Time of last tracker report issued
|
|
double | d_vX [4] |
|
double | d_vY [4] |
|
double | d_vSize [4] |
|
double | d_points |
| vrpn_Analog_Remote * | d_ana |
| | Source of analog data, traditionally vrpn_WiiMote Must present analog channels in this order:
|
| q_xyz_quat_type | d_gravityXform |
| | Gravity correction transformation
|
| q_xyz_quat_type | d_currentPose |
| | Current pose estimate
|
| bool | d_contact |
| | Flag: Have we received the first message from the Wiimote?
|
| bool | d_lock |
| | Flag: Does the tracking algorithm report a lock?
|
| bool | d_updated |
| | Flag: Have we received updated Wiimote data since last report?
|
| bool | d_gravDirty |
| | Flag: Have we received updated gravity data since last gravity update?
|
|
q_vec_type | d_vGravAntepenultimate |
|
q_vec_type | d_vGravPenultimate |
|
q_vec_type | d_vGrav |
|
vrpn_int32 | position_m_id |
|
vrpn_int32 | velocity_m_id |
|
vrpn_int32 | accel_m_id |
|
vrpn_int32 | tracker2room_m_id |
|
vrpn_int32 | unit2sensor_m_id |
|
vrpn_int32 | request_t2r_m_id |
|
vrpn_int32 | request_u2s_m_id |
|
vrpn_int32 | request_workspace_m_id |
|
vrpn_int32 | workspace_m_id |
|
vrpn_int32 | update_rate_id |
|
vrpn_int32 | connection_dropped_m_id |
|
vrpn_int32 | reset_origin_m_id |
|
vrpn_int32 | d_sensor |
|
vrpn_float64 | pos [3] |
|
vrpn_float64 | d_quat [4] |
|
vrpn_float64 | vel [3] |
|
vrpn_float64 | vel_quat [4] |
|
vrpn_float64 | vel_quat_dt |
|
vrpn_float64 | acc [3] |
|
vrpn_float64 | acc_quat [4] |
|
vrpn_float64 | acc_quat_dt |
|
struct timeval | timestamp |
|
vrpn_int32 | frame_count |
|
struct timeval | watchdog_timestamp |
|
vrpn_float64 | tracker2room [3] |
|
vrpn_float64 | tracker2room_quat [4] |
|
vrpn_int32 | num_sensors |
|
vrpn_Tracker_Pos * | unit2sensor |
|
vrpn_Tracker_Quat * | unit2sensor_quat |
|
unsigned | num_unit2sensors |
|
vrpn_float64 | workspace_min [3] |
|
vrpn_float64 | workspace_max [3] |
|
int | status |
| vrpn_Connection * | d_connection |
| | Connection that this object talks to
|
| char * | d_servicename |
| vrpn_int32 | d_sender_id |
| | part
|
| vrpn_int32 | d_text_message_id |
| | ID for text messages
|
| vrpn_int32 | d_ping_message_id |
| | Ask the server if they are there
|
| vrpn_int32 | d_pong_message_id |
| | Server telling that it is there
|
Provides a tracker device given data from a Wii Remote and LED glasses.
Assumes a reasonably-stationary Wii Remote (on a tripod, for example) and two LEDs on a pair of glasses, some fixed distance (default 0.145m) apart. You can use the "Johnny Lee" glasses with this.
Reports poses in a right-hand coordinate system, y-up, that is always level with respect to gravity no matter how your Wii Remote is tilted.