hpp-core: hpp::core::RelativeMotion Struct Reference

hpp-core 9.0.2 Implement basic classes for canonical path planning for kinematic chains.

Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
hpp::core::RelativeMotion Struct Reference

`#include <hpp/core/relative-motion.hh>`

## Public Types
enum | RelativeMotionType { Constrained = 0 , Parameterized = 1 , Unconstrained = 2 }
typedef Eigen::Matrix< RelativeMotionType, Eigen::Dynamic, Eigen::Dynamic > | matrix_type

## Static Public Member Functions
static matrix_type | matrix (const DevicePtr_t &robot)
static void | fromConstraint (matrix_type &matrix, const DevicePtr_t &robot, const ConstraintSetPtr_t &constraint)
static void | recurseSetRelMotion (matrix_type &matrix, const size_type &i1, const size_type &i2, const RelativeMotionType &type)
static size_type | idx (const JointConstPtr_t &joint)

## Member Typedef Documentation

## ◆ matrix_type

typedef Eigen::Matrix<RelativeMotionType, Eigen::Dynamic, Eigen::Dynamic> hpp::core::RelativeMotion::matrix_type

Matrix of relative motion

The row and column indices correspond to joint indices in the robot plus one. 0 corresponds to the environment. The values of the matrix are

- Constrained: the joints are rigidly fixed to each other,
- Parameterized: the joints are rigidly fixed to each other, but the relative transformation may differ from one path to another one,
- Unconstrained: the joints can move with respect to each other.

## Member Enumeration Documentation

## ◆ RelativeMotionType

enum hpp::core::RelativeMotion::RelativeMotionType

Enumerator
Constrained | The relative motion is fully constrained and the constraint cannot be parameterized (has constant right-hand side)
Parameterized | The relative motion is fully constrained but the constraint can be parameterized (has non-constant right-hand side)
Unconstrained | The relative motion is not constrained.

## Member Function Documentation

## ◆ fromConstraint()

static void hpp::core::RelativeMotion::fromConstraint | ( | matrix_type & | matrix,
|  | const DevicePtr_t & | robot,
|  | const ConstraintSetPtr_t & | constraint
| ) |  |
| static

Fill the relative motion matrix with information extracted from the provided ConstraintSet.

Note
  Only LockedJoint and RelativeTransformation of dimension 6 are currently taken into account.

Todo:
  LockedJoint always has a non-constant RHS which means it will always be treated a parameterized constraint. Even when the value is not going to change...

## ◆ idx()

static size_type hpp::core::RelativeMotion::idx | ( | const JointConstPtr_t & | joint | ) |
| inlinestatic

Get the index for a given joint

Returns
  0 if joint is NULL, joint->index() otherwise.

## ◆ matrix()

static matrix_type hpp::core::RelativeMotion::matrix | ( | const DevicePtr_t & | robot | ) |
| static

Build a new RelativeMotion matrix from a robot

Parameters

  robot | a Device, initialize a matrix of size (N+1) x (N+1) where N is the robot number of degrees of freedom. Diagonal elements are set to RelativeMotion::Constrained, other elements are set to RelativeMotion::Unconstrained.

## ◆ recurseSetRelMotion()

static void hpp::core::RelativeMotion::recurseSetRelMotion | ( | matrix_type & | matrix,
|  | const size_type & | i1,
|  | const size_type & | i2,
|  | const RelativeMotionType & | type
| ) |  |
| static

Set the relative motion between two joints

This does nothing if type is Unconstrained. The full matrix is updated as follow. For any indices i0 and i3 different from both i1 and i2:

- set matrix(i0,i2) if i0 and i1 was constrained,
- set matrix(i1,i3) if i2 and i3 was constrained,
- set matrix(i0,i3) if the two previous condition are fulfilled.

The RelativeMotionType is deduced as follow:

- RelativeMotion::Constrained + RelativeMotion::Parameterized -> RelativeMotion::Parameterized
- RelativeMotion::Constrained + RelativeMotion::Constrained -> RelativeMotion::Constrained
- RelativeMotion::Parameterized + RelativeMotion::Parameterized -> RelativeMotion::Parameterized
- RelativeMotion::Unconstrained + * -> RelativeMotion::Unconstrained

The documentation for this struct was generated from the following file:

- include/hpp/core/relative-motion.hh