Libbarrett
1.2.4
|
#include <math.h>
#include <syslog.h>
#include <libconfig.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <barrett/cdlbt/kinematics.h>
#include <barrett/cdlbt/gsl.h>
Functions | |
int | bt_kinematics_create (struct bt_kinematics **kinptr, config_setting_t *kinconfig, int ndofs) |
int | bt_kinematics_destroy (struct bt_kinematics *kin) |
int | bt_kinematics_eval (struct bt_kinematics *kin, const gsl_vector *jposition, const gsl_vector *jvelocity) |
int | bt_kinematics_eval_jacobian (struct bt_kinematics *kin, int jlimit, gsl_vector *point, gsl_matrix *jac) |
Private functions | |
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 |
Implementation of bt_kinematics, a simple forward kinematics library for single-chain revolute robots.
int bt_kinematics_create | ( | struct bt_kinematics ** | kinptr, |
config_setting_t * | kinconfig, | ||
int | ndofs | ||
) |
Create a bt_kinematics object from a given configuration.
This function creates a new kinematics object, reading the DH parameters and toolplate information from the configuration given by kinconfig. Currently, the number of moving links (ndofs) is also passed, and the creating fails if the number of moving links read from the configuration file does not match the expected number.
[out] | kinptr | The bt_kinematics object on success, or 0 on failure |
[in] | kinconfig | Kinematics configuration, from libconfig |
[in] | ndofs | Expected number of moving links |
0 | Success |
int bt_kinematics_destroy | ( | struct bt_kinematics * | kin | ) |
Destroy a bt_kinematics object.
This function destroys a bt_kinematics object created by bt_kinematics_create().
[in] | kin | bt_kinematics object to destroy |
0 | Success |
int bt_kinematics_eval | ( | struct bt_kinematics * | kin, |
const gsl_vector * | jposition, | ||
const gsl_vector * | jvelocity | ||
) |
Evaluate all link transforms, including the toolplate jacobian.
This function is used in a control loop to update all link transform matrices (and associated matrix and vector views) given a vector of joint positions and velocities.
[in] | kin | bt_kinematics object |
[in] | jposition | Joint position vector |
[in] | jvelocity | Joint velocity vector |
0 | Success |
int bt_kinematics_eval_jacobian | ( | struct bt_kinematics * | kin, |
int | jlimit, | ||
gsl_vector * | point, | ||
gsl_matrix * | jac | ||
) |
Evalulate the Jacobian matrix at a paticular point on a particular link.
This function evaluates the Jacobian matrix for a given point on a given moving link.
[in] | kin | bt_kinematics object |
[in] | jlimit | The number of the moving link on which the point lies, (ndofs for the toolplate) |
[in] | point | The point at which the Jacobian should be calculate, in world coordinates |
[out] | jac | The Jacobian matrix into which to calculate; it should be an alread-allocated 6-N matrix. |
0 | Success |