Libbarrett
1.2.4
|
Go to the source code of this file.
Classes | |
struct | bt_calgrav |
Functions | |
int | bt_calgrav_create (struct bt_calgrav **gravptr, config_setting_t *gravconfig, size_t dof) |
int | bt_calgrav_destroy (struct bt_calgrav *grav) |
int | bt_calgrav_eval (struct bt_calgrav *grav, struct bt_kinematics *kin, gsl_vector *jtorque) |
int | bt_calgrav_update (struct bt_calgrav *grav, double val) |
Definition of bt_calgrav, a calibrated gravity compensation module.
Copyright 2009-2014 Barrett Technology <support@barrett.com>
This file is part of libbarrett.
This version of libbarrett is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This version of libbarrett is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this version of libbarrett. If not, see <http://www.gnu.org/licenses/>.
Barrett Technology Inc. 73 Chapel Street Newton, MA 02458
bt_calgrav is a module that implements gravity compensation for single-chain revolute robotic manipulators using a set of first-moment vectors calculated during a calibration process.
The creation function, bt_calgrav_create(), takes a configuration argument. Here is an example configuration, for a 7-DOF WAM:
calgrav: { # Example, for a 7-DOF WAM with hand mus = (( -0.694708, 0.000003, -0.078244 ), ( 0.116866, -0.188539, 3.083559 ), ( 0.175406, 0.208125, 0.097993 ), ( -0.146153, -0.105645, 0.899497 ), ( -0.002888, 0.082166, 0.032478 ), ( -0.006367, -0.030155, 0.149331 ), ( 0.007856, -0.000520, 0.000888 )); };
int bt_calgrav_create | ( | struct bt_calgrav ** | gravptr, |
config_setting_t * | gravconfig, | ||
size_t | dof | ||
) |
Create a bt_calgrav object from a given configuration.
This function creates a new calgrav object, reading the mu vectors from the configuration given by gravconfig. It is also necessary to pass a previously-created bt_kinematics object for kinematics information.
[out] | gravptr | The bt_calgrav object on success, or 0 on failure |
[in] | gravconfig | Calgrav configuration, from libconfig |
[in] | dof | Degrees of freedom |
0 | Success |
int bt_calgrav_destroy | ( | struct bt_calgrav * | grav | ) |
Destroy a bt_calgrav object.
This function destroys a bt_calgrav object created by bt_calgrav_create().
[in] | grav | bt_calgrav object to destroy |
0 | Success |
int bt_calgrav_eval | ( | struct bt_calgrav * | grav, |
struct bt_kinematics * | kin, | ||
gsl_vector * | jtorque | ||
) |
Evaluate first-moment gravity compensation torques.
This function is used in a control loop to calculate the gravity compensation torques of the robot, given a particular configuration (calculated in the kinematics object). The torques are stored into the jtorque vector.
[in] | grav | bt_calgrav object |
[in] | kin | Previously-created bt_kinematics object describing robot |
[out] | jtorque | Computed joint torque vector |
0 | Success |
int bt_calgrav_update | ( | struct bt_calgrav * | grav, |
double | val | ||
) |
Updates the world gravity.
This function updates the world component of the gravity with the requested value
[in] | grav | bt_calgrav object |
[in] | val | new gravity value to be updated |
0 | Success |