Structures and functions for simulation specific functionality. More...
#include "haptix/comm/haptix.h"
Go to the source code of this file.
Data Structures | |
struct | hxsBody |
Information about bodies. More... | |
struct | hxsContact |
Information about contacts. More... | |
struct | hxsDeviceInfo |
Simulated device information, beyond the information provided in hxDeviceInfo. More... | |
struct | hxsJoint |
Information about joints. More... | |
Macros | |
#define | hxsMAXBODY 30 |
Maximum number of bodies. More... | |
#define | hxsMAXCONTACT 30 |
Maximum number of contacts. More... | |
Functions | |
hxResult | hxs_getbody (int _target, hxsBody *_body) |
Get information about bodies. More... | |
hxResult | hxs_getcontact (int _target, hxsContact *_contact) |
Get information about active contacts. More... | |
hxResult | hxs_getdeviceinfo (int _target, hxsDeviceInfo *_deviceinfo) |
Get simulation information. More... | |
hxResult | hxs_getjacobian (int _target, int _link, const float *_point, float *_jacobian) |
Get Jacobian of global point attached to robot link (index between 1 and njoint-1) size of Jacobian matrix is 3-by-njoint, in row-major format. More... | |
hxResult | hxs_getjoint (int _target, hxsJoint *_joint) |
Get information about joints. More... | |
hxResult | hxs_message (const char *_message) |
Display a text message in the simulator. More... | |
hxResult | hxs_setstate (int _target, const hxsBody *_body, const hxsJoint *_joint) |
Set simulation state (position and velocity) as follows: the robot base and objects are set from hxBody. More... | |
hxResult | hxs_updatedirect (int _target, const float *_torque, hxSensor *_sensor, int _flg_sleep) |
Synchronous update with direct torque control: More... | |
Structures and functions for simulation specific functionality.
This header is not needed for use with Gazebo but added for code compatibility with other simulators.
#define hxsMAXBODY 30 |
Maximum number of bodies.
#define hxsMAXCONTACT 30 |
Maximum number of contacts.
hxResult hxs_getbody | ( | int | _target, |
hxsBody * | _body | ||
) |
Get information about bodies.
[in] | _target | Requested device. |
[out] | _body | Body information requested. |
hxResult hxs_getcontact | ( | int | _target, |
hxsContact * | _contact | ||
) |
Get information about active contacts.
[in] | _target | Requested device. |
[out] | _contact | Contact information requested. |
hxResult hxs_getdeviceinfo | ( | int | _target, |
hxsDeviceInfo * | _deviceinfo | ||
) |
Get simulation information.
[in] | _target | Requested device. |
[out] | _deviceinfo | Device information requested. |
hxResult hxs_getjacobian | ( | int | _target, |
int | _link, | ||
const float * | _point, | ||
float * | _jacobian | ||
) |
Get Jacobian of global point attached to robot link (index between 1 and njoint-1) size of Jacobian matrix is 3-by-njoint, in row-major format.
[in] | _target | Requested device. |
[in] | _link | Requested link index. |
[in] | _point | Point information requested. |
[out] | _jacobian | Jacobian information requested. |
hxResult hxs_getjoint | ( | int | _target, |
hxsJoint * | _joint | ||
) |
Get information about joints.
[in] | _target | Requested device. |
[out] | _joint | Joint information requested. |
hxResult hxs_message | ( | const char * | _message | ) |
Display a text message in the simulator.
[in] | _message | Message to display. |
hxResult hxs_setstate | ( | int | _target, |
const hxsBody * | _body, | ||
const hxsJoint * | _joint | ||
) |
Set simulation state (position and velocity) as follows: the robot base and objects are set from hxBody.
the robot links are set from hxJoint via forward kinematics. the robot link data in hxBody, and all acceleration and torque data are ignored.
[in] | _target | Requested device. |
[in] | _body | New body value. |
[in] | _joint | New joint value. |
hxResult hxs_updatedirect | ( | int | _target, |
const float * | _torque, | ||
hxSensor * | _sensor, | ||
int | _flg_sleep | ||
) |
Synchronous update with direct torque control:
[in] | _target | Requested device. |
[in] | _torque | New torque value. |
[out] | _sensor | Sensor data received after the update. |
[in] | _flg_sleep | Advance simulation step this time. |