KinematicSolver Class Reference

Realizes the Singleton-Pattern, Provides Methods to solve Kinematic Problems (forward and inverse) More...

#include <RobotComponents/gui-plugins/RobotTrajectoryDesignerGuiPlugin/KinematicSolver.h>

Public Member Functions

PoseBasePtr doForwardKinematic (VirtualRobot::RobotNodeSetPtr kc, std::vector< double > jointAngles)
 FORWARD KINEMATIC & REACHABILITY///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////. More...
 
PoseBasePtr doForwardKinematicRelative (VirtualRobot::RobotNodeSetPtr kc, std::vector< double > jointAngles)
 doForwardKinematic executes the given jointAngles on the loaded Robot More...
 
bool isReachable (VirtualRobot::RobotNodeSetPtr rns, PoseBasePtr globalPose, VirtualRobot::IKSolver::CartesianSelection cs)
 isReachable calculates whether the PoseBase pose is reachable by the loaded robot or not More...
 
std::vector< double > solveIK (VirtualRobot::RobotNodeSetPtr kc, armarx::PoseBasePtr pose, VirtualRobot::IKSolver::CartesianSelection selection, int iterations)
 IK////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////. More...
 
std::vector< double > solveIKRelative (VirtualRobot::RobotNodeSetPtr kc, armarx::PoseBasePtr framedPose, VirtualRobot::IKSolver::CartesianSelection selection)
 solveIK returns a random solution for an inverse Kinematic problem with no consideration of the current pose of the robot More...
 
std::vector< double > solveRecursiveIK (VirtualRobot::RobotNodeSetPtr kc, std::vector< double > startingPoint, PoseBasePtr globalDestination, VirtualRobot::IKSolver::CartesianSelection selection)
 solveRecursiveIK solves IK based on a starting point and an End point based on one step More...
 
std::vector< std::vector< double > > solveRecursiveIK (VirtualRobot::RobotNodeSetPtr kc, std::vector< double > startingPoint, std::vector< PoseBasePtr > globalDestinations, std::vector< VirtualRobot::IKSolver::CartesianSelection > selections)
 solveRecursiveIK solves IK based on a starting point and an End point based on one step More...
 
std::vector< std::vector< double > > solveRecursiveIK (VirtualRobot::RobotNodeSetPtr kc, std::vector< double > startingPoint, std::vector< PoseBasePtr > globalDestinations, VirtualRobot::IKSolver::CartesianSelection selection)
 
std::vector< floatsolveRecursiveIK (VirtualRobot::RobotNodeSetPtr kc, std::vector< float > startingPoint, PoseBasePtr globalDestination, VirtualRobot::IKSolver::CartesianSelection selection)
 solveRecursiveIK solves IK based on a starting point and an End point based on one step More...
 
std::vector< std::vector< double > > solveRecursiveIKNoMotionPlanning (VirtualRobot::RobotNodeSetPtr kc, std::vector< double > startingPoint, std::vector< PoseBasePtr > globalDestinations, std::vector< VirtualRobot::IKSolver::CartesianSelection > selections)
 
std::vector< double > solveRecursiveIKRelative (VirtualRobot::RobotNodeSetPtr kc, std::vector< double > startingPoint, PoseBasePtr framedDestination, VirtualRobot::IKSolver::CartesianSelection selection)
 solveRecursiveIK solves IK based on a starting point and an End point based on one step More...
 
std::vector< std::vector< double > > solveRecursiveIKRelative (VirtualRobot::RobotNodeSetPtr kc, std::vector< double > startingPoint, std::vector< PoseBasePtr > framedDestinations, std::vector< VirtualRobot::IKSolver::CartesianSelection > selections)
 solveRecursiveIK solves IK based on a starting point and an End point based on one step More...
 
std::vector< floatsolveRecursiveIKRelative (VirtualRobot::RobotNodeSetPtr kc, std::vector< float > startingPoint, PoseBasePtr framedDestination, VirtualRobot::IKSolver::CartesianSelection selection)
 solveRecursiveIK solves IK based on a starting point and an End point based on one step More...
 
void syncRobotPrx ()
 syncRobotPrx always updates the robotProxy with the jointAngles of the "real" robot More...
 
void syncRobotPrx (VirtualRobot::RobotNodeSetPtr rns)
 syncRobotPrx updates the robotProxy with the jointAngles of the "real" when the rns is different to the current rns More...
 

Static Public Member Functions

static std::shared_ptr< KinematicSolvergetInstance (VirtualRobot::ScenePtr scenario, VirtualRobot::RobotPtr robot)
 SINGLETON-FEATURES////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////. More...
 
static void reset ()
 reset Destroys the current instance of KinematicSolver that a new one can be created via call of getInstance More...
 

Detailed Description

Realizes the Singleton-Pattern, Provides Methods to solve Kinematic Problems (forward and inverse)

Definition at line 51 of file KinematicSolver.h.

Member Function Documentation

◆ doForwardKinematic()

PoseBasePtr doForwardKinematic ( VirtualRobot::RobotNodeSetPtr  kc,
std::vector< double >  jointAngles 
)

FORWARD KINEMATIC & REACHABILITY///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////.

doForwardKinematic executes the given jointAngles on the loaded Robot

Parameters
kcthe kinematic Chain on which the joint angles are executed on
jointAnglesthe joint angles which the robot should have
Returns
a vector of joint angle configurations to reach destination 1,..., n in exactly the same order as the destinations

Definition at line 459 of file KinematicSolver.cpp.

+ Here is the call graph for this function:

◆ doForwardKinematicRelative()

PoseBasePtr doForwardKinematicRelative ( VirtualRobot::RobotNodeSetPtr  kc,
std::vector< double >  jointAngles 
)

doForwardKinematic executes the given jointAngles on the loaded Robot

Parameters
kcthe kinematic Chain on which the joint angles are executed on
jointAnglesthe joint angles which the robot should have
Returns
a vector of joint angle configurations to reach destination 1,..., n in exactly the same order as the destinations

Definition at line 466 of file KinematicSolver.cpp.

+ Here is the call graph for this function:

◆ getInstance()

KinematicSolverPtr getInstance ( VirtualRobot::ScenePtr  scenario,
VirtualRobot::RobotPtr  robot 
)
static

SINGLETON-FEATURES////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////.

getInstance returns an instance of a new KinematicSolver with the attributes scenario and robot if no KinematicSolver is initialized yet if a KinematicSolver has already been initialized the method returns that one (see Singleton-Pattern)

Parameters
scenariothe objects surronding the robot that have to be regarded when calculating an IKSolution
robotthe robot for which the Kinematic Solution is calculated
Returns
the single instance of KinematicSolver

Definition at line 92 of file KinematicSolver.cpp.

+ Here is the caller graph for this function:

◆ isReachable()

bool isReachable ( VirtualRobot::RobotNodeSetPtr  rns,
PoseBasePtr  globalPose,
VirtualRobot::IKSolver::CartesianSelection  cs 
)

isReachable calculates whether the PoseBase pose is reachable by the loaded robot or not

Parameters
posethe pose that should be reachable by the robot
Returns
returns true if the pose is reachable, false otherwise

ALTERNATIVE WITH REACHABILITY MAPS

Definition at line 474 of file KinematicSolver.cpp.

◆ reset()

void reset ( )
static

reset Destroys the current instance of KinematicSolver that a new one can be created via call of getInstance

Definition at line 103 of file KinematicSolver.cpp.

+ Here is the caller graph for this function:

◆ solveIK()

std::vector< double > solveIK ( VirtualRobot::RobotNodeSetPtr  kc,
armarx::PoseBasePtr  pose,
VirtualRobot::IKSolver::CartesianSelection  selection,
int  iterations 
)

IK////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////.

solveIK returns a random solution for an inverse Kinematic problem with no consideration of the current pose of the robot

Parameters
kcthe kinematic chain for which the IK solution is calculated
posethe GLOBAL pose that should be reached by the tcp of the kinematic chain kc when the joint values of the solution are applied to the robot
selectionthe attributes of the pose that are considered when solving the IK problem, e.g. position, orientation or all
Returns
an mostly random IK solution for the given PoseBase and kinematic Chain

Definition at line 115 of file KinematicSolver.cpp.

+ Here is the call graph for this function:

◆ solveIKRelative()

std::vector< double > solveIKRelative ( VirtualRobot::RobotNodeSetPtr  kc,
armarx::PoseBasePtr  framedPose,
VirtualRobot::IKSolver::CartesianSelection  selection 
)

solveIK returns a random solution for an inverse Kinematic problem with no consideration of the current pose of the robot

Parameters
kcthe kinematic chain for which the IK solution is calculated
posethe FRAMED POSE RELATIVE TO THE ROBOTS KINEMATIC ROOT that should be reached by the tcp of the kinematic chain kc when the joint values of the solution are applied to the robot
selectionthe attributes of the pose that are considered when solving the IK problem, e.g. position, orientation or all
Returns
an mostly random IK solution for the given PoseBase and kinematic Chain RELATIVE TO THE ROBOTS KINEMATIC ROOT

Definition at line 150 of file KinematicSolver.cpp.

◆ solveRecursiveIK() [1/4]

std::vector<double> solveRecursiveIK ( VirtualRobot::RobotNodeSetPtr  kc,
std::vector< double >  startingPoint,
PoseBasePtr  globalDestination,
VirtualRobot::IKSolver::CartesianSelection  selection 
)

solveRecursiveIK solves IK based on a starting point and an End point based on one step

Parameters
kcthe selected kinematic chain, for which the IK Solution should be found
startingPointthe jointAngle values of the starting Pose of the robot
destinationsthe GLOBAL Pose that should be reached
selectionthe attributes of the pose that are considered when solving the IK problem, e.g. position, orientation or all
Returns
an mostly random IK solution for the given PoseBase and kinematic Chain in form joint angle configuration

◆ solveRecursiveIK() [2/4]

std::vector<std::vector<double> > solveRecursiveIK ( VirtualRobot::RobotNodeSetPtr  kc,
std::vector< double >  startingPoint,
std::vector< PoseBasePtr >  globalDestinations,
std::vector< VirtualRobot::IKSolver::CartesianSelection >  selections 
)

solveRecursiveIK solves IK based on a starting point and an End point based on one step

Parameters
kcthe selected kinematic chain, for which the IK Solution should be found
startingPointthe jointAngle values of the starting Pose of the robot
destinationsthe GLOBAL Pose that should be reached
selectionthe attributes of the pose that are considered when solving the IK problem, e.g. position, orientation or all
Returns
an mostly random IK solution for the given PoseBase and kinematic Chain in form joint angle configuration

◆ solveRecursiveIK() [3/4]

std::vector<std::vector<double> > solveRecursiveIK ( VirtualRobot::RobotNodeSetPtr  kc,
std::vector< double >  startingPoint,
std::vector< PoseBasePtr >  globalDestinations,
VirtualRobot::IKSolver::CartesianSelection  selection 
)

◆ solveRecursiveIK() [4/4]

std::vector<float> solveRecursiveIK ( VirtualRobot::RobotNodeSetPtr  kc,
std::vector< float startingPoint,
PoseBasePtr  globalDestination,
VirtualRobot::IKSolver::CartesianSelection  selection 
)

solveRecursiveIK solves IK based on a starting point and an End point based on one step

Parameters
kcthe selected kinematic chain, for which the IK Solution should be found
startingPointthe jointAngle values of the starting Pose of the robot
destinationsthe GLOBAL Pose that should be reached
selectionthe attributes of the pose that are considered when solving the IK problem, e.g. position, orientation or all
Returns
an mostly random IK solution for the given PoseBase and kinematic Chain in form joint angle configuration

◆ solveRecursiveIKNoMotionPlanning()

std::vector< std::vector< double > > solveRecursiveIKNoMotionPlanning ( VirtualRobot::RobotNodeSetPtr  kc,
std::vector< double >  startingPoint,
std::vector< PoseBasePtr >  globalDestinations,
std::vector< VirtualRobot::IKSolver::CartesianSelection >  selections 
)

Definition at line 379 of file KinematicSolver.cpp.

+ Here is the call graph for this function:

◆ solveRecursiveIKRelative() [1/3]

std::vector<double> solveRecursiveIKRelative ( VirtualRobot::RobotNodeSetPtr  kc,
std::vector< double >  startingPoint,
PoseBasePtr  framedDestination,
VirtualRobot::IKSolver::CartesianSelection  selection 
)

solveRecursiveIK solves IK based on a starting point and an End point based on one step

Parameters
kcthe selected kinematic chain, for which the IK Solution should be found
startingPointthe jointAngle values of the starting Pose of the robot
destinationsthe FRAMED POSE RELATIVE TO THE ROBOTS KINEMATIC ROOT that should be reached
selectionthe attributes of the pose that are considered when solving the IK problem, e.g. position, orientation or all
Returns
an mostly random IK solution for the given PoseBase and kinematic Chain in form joint angle configuration

◆ solveRecursiveIKRelative() [2/3]

std::vector<std::vector<double> > solveRecursiveIKRelative ( VirtualRobot::RobotNodeSetPtr  kc,
std::vector< double >  startingPoint,
std::vector< PoseBasePtr >  framedDestinations,
std::vector< VirtualRobot::IKSolver::CartesianSelection >  selections 
)

solveRecursiveIK solves IK based on a starting point and an End point based on one step

Parameters
kcthe selected kinematic chain, for which the IK Solution should be found
startingPointthe jointAngle values of the starting Pose of the robot
destinationsthe FRAMED POSE RELATIVE TO THE ROBOTS KINEMATIC ROOT that should be reached
selectionthe attributes of the pose that are considered when solving the IK problem, e.g. position, orientation or all
Returns
an mostly random IK solution for the given PoseBase and kinematic Chain in form joint angle configuration

◆ solveRecursiveIKRelative() [3/3]

std::vector<float> solveRecursiveIKRelative ( VirtualRobot::RobotNodeSetPtr  kc,
std::vector< float startingPoint,
PoseBasePtr  framedDestination,
VirtualRobot::IKSolver::CartesianSelection  selection 
)

solveRecursiveIK solves IK based on a starting point and an End point based on one step

Parameters
kcthe selected kinematic chain, for which the IK Solution should be found
startingPointthe jointAngle values of the starting Pose of the robot
destinationsthe FRAMED POSE RELATIVE TO THE ROBOTS KINEMATIC ROOT that should be reached
selectionthe attributes of the pose that are considered when solving the IK problem, e.g. position, orientation or all
Returns
an mostly random IK solution for the given PoseBase and kinematic Chain in form joint angle configuration

◆ syncRobotPrx() [1/2]

void syncRobotPrx ( )

syncRobotPrx always updates the robotProxy with the jointAngles of the "real" robot

Definition at line 505 of file KinematicSolver.cpp.

◆ syncRobotPrx() [2/2]

void syncRobotPrx ( VirtualRobot::RobotNodeSetPtr  rns)

syncRobotPrx updates the robotProxy with the jointAngles of the "real" when the rns is different to the current rns

Parameters
rnsthe newly selected rns

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