Go to the source code of this file.
◆ allocate_sensor()
void allocate_sensor |
( |
MbsSensor * |
psens, |
|
|
int |
njoint |
|
) |
| |
Allocate the Jacobian matrix of the MbsSensor according to the number of joints in the multibody system.
- Parameters
-
◆ free_sensor()
Deprecated: Free the memory inside MbsSensor structure. i.e. free the space allocated for the jacobian matrix and the rotation matrix of the sensor.
- Parameters
-
[in,out] | psens | Pointer to the MbsSensor structure to be freed. |
◆ init_sensor()
void init_sensor |
( |
MbsSensor * |
psens, |
|
|
int |
njoint |
|
) |
| |
Initialize all fields of MbsSensor structure to 0.
- Parameters
-
[in,out] | psens | Pointer to the MbsSensor structure to initialize. |
[in] | njoint | Number of joint in the MBS, see MbsData::njoint. |
◆ mbs_comp_F_sensor()
int mbs_comp_F_sensor |
( |
MbsSensor * |
psens, |
|
|
struct MbsData * |
mbs_data, |
|
|
int |
isens |
|
) |
| |
Compute all fields of the specified force sensor.
- Parameters
-
[in,out] | psens | Pointer to the MbsSensor structure to compute. |
[in] | mbs_data | pointer to the MbsData structure of the model related to the sensor. |
[in] | isens | the ID of the force sensor. |
- Returns
MBS_INFO_SUCCESS
in case of success.
◆ mbs_comp_gen_sensor()
int mbs_comp_gen_sensor |
( |
MbsSensor * |
psens, |
|
|
struct MbsData * |
mbs_data, |
|
|
int |
joint_id |
|
) |
| |
Compute all fields of a sensor located on the specified joint.
- Parameters
-
[in,out] | psens | Pointer to the MbsSensor structure to compute. |
[in] | mbs_data | pointer to the MbsData structure of the model related to the sensor. |
[in] | joint_id | the ID of the joint. |
- Returns
MBS_INFO_SUCCESS
in case of success.
◆ mbs_comp_S_sensor()
int mbs_comp_S_sensor |
( |
MbsSensor * |
psens, |
|
|
struct MbsData * |
mbs_data, |
|
|
int |
isens |
|
) |
| |
Compute all fields of the specified sensor.
- Parameters
-
[in,out] | psens | Pointer to the MbsSensor structure to compute. |
[in] | mbs_data | pointer to the MbsData structure of the model related to the sensor. |
[in] | isens | the ID of the sensor. |
- Returns
MBS_INFO_SUCCESS
in case of success.
◆ mbs_delete_sensor()
Free the memory of MbsSensor structure. and its contents.
It frees the MbsSensor structure itself and all its fields.
- Parameters
-
[in,out] | psens | Pointer to the MbsSensor structure to be freed. |
◆ mbs_new_sensor()
Create a new MbsSensor structure, allocate and initialize the memory for all fields.
This function calls allocate_sensor
and init_sensor
.