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. More...
 
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.

Definition at line 49 of file NaturalIK.h.

Constructor & Destructor Documentation

◆ NaturalIK()

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

Definition at line 33 of file NaturalIK.cpp.

Member Function Documentation

◆ calculateIK() [1/2]

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

Definition at line 98 of file NaturalIK.cpp.

+ Here is the call graph for this function:

◆ calculateIK() [2/2]

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

Definition at line 84 of file NaturalIK.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculateIKpos()

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

Definition at line 91 of file NaturalIK.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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"

Definition at line 112 of file NaturalIK.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forwardKinematics()

Definition at line 168 of file NaturalIK.cpp.

+ Here is the caller graph for this function:

◆ getLowerArmLength()

float getLowerArmLength ( ) const

Definition at line 209 of file NaturalIK.cpp.

◆ getScale()

float getScale ( )

Definition at line 194 of file NaturalIK.cpp.

◆ getShoulderPos()

Eigen::Vector3f getShoulderPos ( )

Definition at line 106 of file NaturalIK.cpp.

◆ getUpperArmLength()

float getUpperArmLength ( ) const

Definition at line 199 of file NaturalIK.cpp.

◆ setLowerArmLength()

void setLowerArmLength ( float  value)

Definition at line 214 of file NaturalIK.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setScale()

void setScale ( float  scale)

Definition at line 189 of file NaturalIK.cpp.

◆ setUpperArmLength()

void setUpperArmLength ( float  value)

Definition at line 204 of file NaturalIK.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ solveSoechtingIK()

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

Definition at line 39 of file NaturalIK.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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