HAPTIX API

Data Fields
hxSensor Struct Reference

Sensor data. More...

#include <haptix.h>

Data Fields

float contact [32]
 Contact normal force (N). More...
 
float imu_angular_vel [32][3]
 3D angular velocity (rad/s). More...
 
float imu_linear_acc [32][3]
 3D accelerometer output (m/s^2). More...
 
float imu_orientation [32][4]
 3D orientation quaternion. More...
 
float joint_pos [32]
 Joint position (rad). More...
 
float joint_vel [32]
 Joint velocity (rad/s). More...
 
float motor_pos [32]
 Motor position (rad). More...
 
float motor_torque [32]
 Torque applied by embedded controller (Nm). More...
 
float motor_vel [32]
 Motor velocity (rad/s). More...
 
hxTime time_stamp
 Timestamp. More...
 

Detailed Description

Sensor data.

This data structure specifies the sensor information gained in a simulation update. It is an output of the function hx_update(const hxCommand*, hxSensor*).

Field Documentation

float hxSensor::contact[32]

Contact normal force (N).

An array of floats of size hxMAXCONTACTSENSOR. Entries 0 through hxRobotInfo::ncontactsensor contain the contact magnitude for each contact sensor.

float hxSensor::imu_angular_vel[32][3]

3D angular velocity (rad/s).

An array of floats of size #hxMAXIMUx3 where each row is a 3-dimensional angular velocity vector. This measurement is expressed in a body-fixed frame. The entries of each row are measured in radians per second and ordered (x, y, z). Entries 0 through hxRobotInfo::nimu-1 contain the velocity vectors for each IMU.

The ordering of these IMU values is consistent with hxSensor::imu_linear_acc.

float hxSensor::imu_linear_acc[32][3]

3D accelerometer output (m/s^2).

An array of floats of size #hxMAXIMUx3 where each row is a 3-dimensional vector of accelerometer output, which comprises the vector difference (a-g), where a is the linear acceleration and g is the gravity vector. This measurement is expressed in a body-fixed frame. The entries of each row are measured in meters per second squared and ordered (x, y, z). Entries 0 through hxRobotInfo::nimu-1 contain the acceleration vectors for each IMU.
The ordering of these IMU values is consistent with hxSensor::imu_angular_vel.

float hxSensor::imu_orientation[32][4]

3D orientation quaternion.

This value is set to a unit value of (1, 0, 0, 0), until the IMUs on the hardware is known to provide an orientation estimate. The expected coordinate ordering of quaternions is (w, x, y, z).

float hxSensor::joint_pos[32]

Joint position (rad).

An array of floats of size hxMAXJOINT. Entries 0 through hxRobotInfo::njoint-1 contain the angular position for each joint. The ordering of these joint values is consistent with hxSensor::joint_vel.

float hxSensor::joint_vel[32]

Joint velocity (rad/s).

An array of floats of size hxMAXJOINT. Entries 0 through hxRobotInfo::njoint-1 contain the angular position for each joint. The ordering of these joint values is consistent with hxSensor::joint_pos.

float hxSensor::motor_pos[32]

Motor position (rad).

An array of floats of size hxMAXMOTOR. Entries 0 through hxRobotInfo::nmotors-1 contain the angular positions for each motor. The ordering of these motor values is consistent across the different motor-related properties of #hxSensor.

These values cannot exceed the minimum and maximum values specified in hxRobotInfo::motor_limit.

float hxSensor::motor_torque[32]

Torque applied by embedded controller (Nm).

An array of floats of size hxMAXMOTOR. Entries 0 through hxRobotInfo::nmotors-1 contain the torque for each motor. The ordering of these motor values is consistent across the different motor-related properties of #hxSensor.

float hxSensor::motor_vel[32]

Motor velocity (rad/s).

An array of floats of size hxMAXMOTOR. Entries 0 through hxRobotInfo::nmotors-1 contain the angular velocity for each motor. The ordering of these motor values is consistent across the different motor-related properties of hxSensor.

hxTime hxSensor::time_stamp

Timestamp.

Time at which the sensor reading was taken. See #hxTime for data format.


The documentation for this struct was generated from the following file: