Libbarrett
1.2.4
|
#include <syslog.h>
#include <libconfig.h>
#include <gsl/gsl_blas.h>
#include <barrett/cdlbt/dynamics.h>
#include <barrett/cdlbt/gsl.h>
Functions | |
int | bt_dynamics_create (struct bt_dynamics **dynptr, config_setting_t *dynconfig, int ndofs) |
int | bt_dynamics_destroy (struct bt_dynamics *dyn) |
int | bt_dynamics_eval_inverse (struct bt_dynamics *dyn, const struct bt_kinematics *kin, const gsl_vector *jvel, const gsl_vector *jacc, gsl_vector *jtor) |
int | bt_dynamics_eval_jsim (struct bt_dynamics *dyn, struct bt_kinematics *kin) |
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_dynamics, a simple dynamics library which uses the Recursive Newton-Euler Algorithm for single-chain revolute robots.
int bt_dynamics_create | ( | struct bt_dynamics ** | dynptr, |
config_setting_t * | dynconfig, | ||
int | ndofs | ||
) |
Create a bt_dynamics object from a given configuration.
This function creates a new dynamics object, center-of-mass and inertial information from the configuration given by dynconfig. 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. It is also necessary to pass a previously-created bt_kinematics object for kinematics information.
[out] | dynptr | The bt_dynamics object on success, or 0 on failure |
[in] | dynconfig | Dynamics configuration, from libconfig |
[in] | ndofs | Expected number of moving links |
[in] | kin | Previously-created bt_kinematics object describing robot |
0 | Success |
int bt_dynamics_destroy | ( | struct bt_dynamics * | dyn | ) |
Destroy a bt_dynamics object.
This function destroys a bt_dynamics object created by bt_dynamics_create().
[in] | dyn | bt_dynamics object to destroy |
0 | Success |
int bt_dynamics_eval_inverse | ( | struct bt_dynamics * | dyn, |
const struct bt_kinematics * | kin, | ||
const gsl_vector * | jvel, | ||
const gsl_vector * | jacc, | ||
gsl_vector * | jtor | ||
) |
Evaluate inverse dynamics using the RNEA, both forward and backward.
This function is used in a control loop to calculate the inverse dynamics of the robot, given a particular configuration (calculated in the kinematics object), set of joint velocities, and set of desired joint accelerations. The resulting joint torques are stored in jtor.
[in] | dyn | bt_dynamics object |
[in] | jvel | Present joint velocity vector |
[in] | jacc | Desired joint acceleration vector |
[out] | jtor | Computed joint torque vector |
0 | Success |
int bt_dynamics_eval_jsim | ( | struct bt_dynamics * | dyn, |
struct bt_kinematics * | kin | ||
) |
Calculate the Joint-Space Inertia Matrix (JSIM).
The formulation used is the explicit formulation given in Spong, Hutchinson, and Vidyasagar: Robot Modeling and Control, 2006 page 254.
[in] | dyn | bt_dynamics object |