NaturalIK Class Reference

The NaturalIK class. More...

#include <RobotAPI/libraries/natik/NaturalIK.h>

Classes

struct  ArmJoints
 
struct  Parameters
 
struct  SoechtingAngles
 
struct  SoechtingForwardPositions
 

Public Member Functions

NaturalDiffIK::Result calculateIK (const Eigen::Matrix4f &targetPose, ArmJoints arm, NaturalDiffIK::Mode setOri, NaturalIK::Parameters params=NaturalIK::Parameters())
 
NaturalDiffIK::Result calculateIK (const Eigen::Matrix4f &targetPose, ArmJoints arm, NaturalIK::Parameters params=NaturalIK::Parameters())
 
NaturalDiffIK::Result calculateIKpos (const Eigen::Vector3f &targetPos, ArmJoints arm, NaturalIK::Parameters params=NaturalIK::Parameters())
 
SoechtingAngles CalculateSoechtingAngles (Eigen::Vector3f target)
 NaturalIK::CalculateSoechtingAngles.
 
SoechtingForwardPositions forwardKinematics (SoechtingAngles sa)
 
float getLowerArmLength () const
 
float getScale ()
 
Eigen::Vector3f getShoulderPos ()
 
float getUpperArmLength () const
 
 NaturalIK (std::string side, Eigen::Vector3f shoulderPos=Eigen::Vector3f::Zero(), float scale=1)
 
void setLowerArmLength (float value)
 
void setScale (float scale)
 
void setUpperArmLength (float value)
 
NaturalIK::SoechtingForwardPositions solveSoechtingIK (const Eigen::Vector3f &targetPos, std::optional< float > minElbowHeight=std::nullopt)
 

Detailed Description

The NaturalIK class.

Calculates natural looking IK solutions by

  1. Calculate Soechting angles
  2. Calculate ForwardKinematics with Soechting angles
  3. Use calculated elbow position as a nullspace target for the robot's elbow during diffik

WARNING: Only works if robot model is facing forward in Y-direction (like ARMAR-III, ARMAR-IV, ARMAR-6) WARNING2: Soechting model is not valid for all targets. However, elbow position seems to extrapolate fine.

Constructor & Destructor Documentation

◆ NaturalIK()

NaturalIK ( std::string side,
Eigen::Vector3f shoulderPos = Eigen::Vector3f::Zero(),
float scale = 1 )

Member Function Documentation

◆ calculateIK() [1/2]

NaturalDiffIK::Result calculateIK ( const Eigen::Matrix4f & targetPose,
NaturalIK::ArmJoints arm,
NaturalDiffIK::Mode setOri,
NaturalIK::Parameters params = NaturalIK::Parameters() )

◆ calculateIK() [2/2]

NaturalDiffIK::Result calculateIK ( const Eigen::Matrix4f & targetPose,
ArmJoints arm,
NaturalIK::Parameters params = NaturalIK::Parameters() )

◆ calculateIKpos()

NaturalDiffIK::Result calculateIKpos ( const Eigen::Vector3f & targetPos,
NaturalIK::ArmJoints arm,
NaturalIK::Parameters params = NaturalIK::Parameters() )

◆ CalculateSoechtingAngles()

NaturalIK::SoechtingAngles CalculateSoechtingAngles ( Eigen::Vector3f target)

NaturalIK::CalculateSoechtingAngles.

Parameters
targetPointing target in mm, relative to the soulder position. X: right, Y: forward, Z: up
sideLeft or Right
scalescale factor to match the robots arm length to the human arm length
Returns
Angles described in Soechting and Flanders "Errors in Pointing are Due to Approximations in Sensorimotor Transformations"

◆ forwardKinematics()

◆ getLowerArmLength()

float getLowerArmLength ( ) const

◆ getScale()

float getScale ( )

◆ getShoulderPos()

Eigen::Vector3f getShoulderPos ( )

◆ getUpperArmLength()

float getUpperArmLength ( ) const

◆ setLowerArmLength()

void setLowerArmLength ( float value)

◆ setScale()

void setScale ( float scale)

◆ setUpperArmLength()

void setUpperArmLength ( float value)

◆ solveSoechtingIK()

NaturalIK::SoechtingForwardPositions solveSoechtingIK ( const Eigen::Vector3f & targetPos,
std::optional< float > minElbowHeight = std::nullopt )

The documentation for this class was generated from the following files: