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///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////.
 
PoseBasePtr doForwardKinematicRelative (VirtualRobot::RobotNodeSetPtr kc, std::vector< double > jointAngles)
 doForwardKinematic executes the given jointAngles on the loaded Robot
 
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
 
std::vector< double > solveIK (VirtualRobot::RobotNodeSetPtr kc, armarx::PoseBasePtr pose, VirtualRobot::IKSolver::CartesianSelection selection, int iterations)
 IK////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////.
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
void syncRobotPrx ()
 syncRobotPrx always updates the robotProxy with the jointAngles of the "real" robot
 
void syncRobotPrx (VirtualRobot::RobotNodeSetPtr rns)
 syncRobotPrx updates the robotProxy with the jointAngles of the "real" when the rns is different to the current rns
 

Static Public Member Functions

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

Detailed Description

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

Definition at line 52 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 536 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 544 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 105 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 553 of file KinematicSolver.cpp.

+ Here is the call graph for this function:

◆ 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 117 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 129 of file KinematicSolver.cpp.

+ Here is the call graph for this function:
+ Here is the caller 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 169 of file KinematicSolver.cpp.

+ Here is the call graph for this function:

◆ 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 438 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 586 of file KinematicSolver.cpp.

+ Here is the caller graph for this function:

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