Libbarrett  1.2.4
Classes | Functions
include/barrett/cdlbt/calgrav.h File Reference
#include <gsl/gsl_vector.h>
#include <barrett/cdlbt/kinematics.h>

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)

Detailed Description

Definition of bt_calgrav, a calibrated gravity compensation module.

Author:
Christopher Dellin
Date:
2008-2009

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

Introduction

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.

Configuration Syntax

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 ));
};

Function Documentation

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.

Parameters:
[out]gravptrThe bt_calgrav object on success, or 0 on failure
[in]gravconfigCalgrav configuration, from libconfig
[in]dofDegrees of freedom
Return values:
0Success
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().

Parameters:
[in]gravbt_calgrav object to destroy
Return values:
0Success
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.

Parameters:
[in]gravbt_calgrav object
[in]kinPreviously-created bt_kinematics object describing robot
[out]jtorqueComputed joint torque vector
Return values:
0Success
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

Parameters:
[in]gravbt_calgrav object
[in]valnew gravity value to be updated
Return values:
0Success
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines