kinematics-dynamics
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
roboticslab::ICartesianSolver Class Referenceabstract

Abstract base class for a cartesian solver.

#include <ICartesianSolver.h>

Inheritance diagram for roboticslab::ICartesianSolver:
AsibotSolver KdlSolver KdlTreeSolver

Public Types

enum class  Frame { BASE = yarp::os::createVocab32('c','p','f','b') , TCP = yarp::os::createVocab32('c','p','f','t') }
 Lists supported reference frames. More...
 
enum  reference_frame { BASE_FRAME = static_cast<int>(Frame::BASE) , TCP_FRAME = static_cast<int>(Frame::TCP) }
 

Public Member Functions

virtual ~ICartesianSolver ()=default
 Destructor.
 
virtual yarp::dev::ReturnValue getNumJoints (std::size_t &numJoints)=0
 Get number of joints for which the solver has been configured.
 
virtual yarp::dev::ReturnValue getNumTcps (std::size_t &numTcps)=0
 Get number of TCPs for which the solver has been configured.
 
virtual yarp::dev::ReturnValue appendLink (const std::vector< double > &x)=0
 Append an additional link.
 
virtual yarp::dev::ReturnValue restoreOriginalChain ()=0
 Restore original kinematic chain.
 
virtual yarp::dev::ReturnValue changeOrigin (const std::vector< double > &x_old_obj, const std::vector< double > &x_new_old, std::vector< double > &x_new_obj)=0
 Change origin in which a pose is expressed.
 
virtual yarp::dev::ReturnValue forwardKinematics (const std::vector< double > &q, std::vector< double > &x)=0
 Perform forward kinematics.
 
virtual yarp::dev::ReturnValue poseDiff (const std::vector< double > &xLhs, const std::vector< double > &xRhs, std::vector< double > &xOut)=0
 Obtain difference between supplied pose inputs.
 
virtual yarp::dev::ReturnValue inverseKinematics (const std::vector< double > &xd, const std::vector< double > &qGuess, std::vector< double > &q, Frame frame=Frame::BASE)=0
 Perform inverse kinematics.
 
virtual yarp::dev::ReturnValue diffInverseKinematics (const std::vector< double > &q, const std::vector< double > &xdot, std::vector< double > &qdot, Frame frame=Frame::BASE)=0
 Perform differential inverse kinematics.
 
virtual yarp::dev::ReturnValue inverseDynamics (const std::vector< double > &q, std::vector< double > &t)=0
 Perform inverse dynamics.
 
virtual yarp::dev::ReturnValue inverseDynamics (const std::vector< double > &q, const std::vector< double > &qdot, const std::vector< double > &qdotdot, const std::vector< double > &ftip, std::vector< double > &t, Frame frame=Frame::BASE)=0
 Perform inverse dynamics.
 
virtual bool invKin (const std::vector< double > &xd, const std::vector< double > &qGuess, std::vector< double > &q, reference_frame frame=static_cast< reference_frame >(Frame::BASE))
 
virtual bool diffInvKin (const std::vector< double > &q, const std::vector< double > &xdot, std::vector< double > &qdot, reference_frame frame=static_cast< reference_frame >(Frame::BASE))
 
virtual bool invDyn (const std::vector< double > &q, const std::vector< double > &qdot, const std::vector< double > &qdotdot, const std::vector< double > &ftip, std::vector< double > &t, reference_frame frame=static_cast< reference_frame >(Frame::BASE))
 

Member Enumeration Documentation

◆ Frame

Enumerator
BASE 

Base frame.

TCP 

End-effector frame (TCP)

Member Function Documentation

◆ appendLink()

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::appendLink ( const std::vector< double > &  x)
pure virtual
Parameters
x6-element vector describing end-effector frame in cartesian space; first three elements denote translation (meters), last three denote rotation in scaled axis-angle representation (radians).
Returns
true on success, false otherwise

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.

◆ changeOrigin()

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::changeOrigin ( const std::vector< double > &  x_old_obj,
const std::vector< double > &  x_new_old,
std::vector< double > &  x_new_obj 
)
pure virtual
Parameters
x_old_obj_in6-element vector describing a pose in cartesian space, expressed in the old frame; first three elements denote translation (meters), last three denote rotation in scaled axis-angle representation (radians).
x_new_old6-element vector describing a transformation from the new to the old frame; first three elements denote translation (meters), last three denote rotation in scaled axis-angle representation (radians).
x_new_obj6-element vector describing a pose in cartesian space, expressed in the new frame; first three elements denote translation (meters), last three denote rotation in scaled axis-angle representation (radians).
Returns
true on success, false otherwise

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.

◆ diffInverseKinematics()

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::diffInverseKinematics ( const std::vector< double > &  q,
const std::vector< double > &  xdot,
std::vector< double > &  qdot,
Frame  frame = Frame::BASE 
)
pure virtual
Parameters
qVector describing current position in joint space (meters or degrees).
xdot6-element vector describing desired velocity in cartesian space; first three elements denote translational velocity (meters/second), last three denote angular velocity (radians/second).
qdotVector describing target velocity in joint space (meters/second or degrees/second).
framePoints at the frame the desired position is expressed in.
Returns
true on success, false otherwise

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.

◆ forwardKinematics()

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::forwardKinematics ( const std::vector< double > &  q,
std::vector< double > &  x 
)
pure virtual
Parameters
qVector describing a position in joint space (meters or degrees).
x6-element vector describing same position in cartesian space; first three elements denote translation (meters), last three denote rotation in scaled axis-angle representation (radians).
Returns
true on success, false otherwise

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.

◆ getNumJoints()

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::getNumJoints ( std::size_t &  numJoints)
pure virtual
Returns
Number of joints.

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.

◆ getNumTcps()

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::getNumTcps ( std::size_t &  numTcps)
pure virtual
Returns
The number of TCPs.

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.

◆ inverseDynamics() [1/2]

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::inverseDynamics ( const std::vector< double > &  q,
const std::vector< double > &  qdot,
const std::vector< double > &  qdotdot,
const std::vector< double > &  ftip,
std::vector< double > &  t,
Frame  frame = Frame::BASE 
)
pure virtual
Parameters
qVector describing current position in joint space (meters or degrees).
qdotVector describing current velocity in joint space (meters/second or degrees/second).
qdotdotVector describing current acceleration in joint space (meters/second² or degrees/second²).
ftipVector describing an external force applied to the robot tip, expressed in cartesian space; first three elements denote translational acceleration (meters/second²), last three denote angular acceleration (radians/second²).
t6-element vector describing desired forces in cartesian space; first three elements denote translational acceleration (meters/second²), last three denote angular acceleration (radians/second²).
framePoints at the frame ftip is expressed in.
Returns
true on success, false otherwise

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.

◆ inverseDynamics() [2/2]

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::inverseDynamics ( const std::vector< double > &  q,
std::vector< double > &  t 
)
pure virtual

Assumes null joint velocities and accelerations, and no external forces.

Parameters
qVector describing current position in joint space (meters or degrees).
t6-element vector describing desired forces in cartesian space; first three elements denote translational acceleration (meters/second²), last three denote angular acceleration (radians/second²).
Returns
true on success, false otherwise

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.

◆ inverseKinematics()

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::inverseKinematics ( const std::vector< double > &  xd,
const std::vector< double > &  qGuess,
std::vector< double > &  q,
Frame  frame = Frame::BASE 
)
pure virtual
Parameters
xd6-element vector describing desired position in cartesian space; first three elements denote translation (meters), last three denote rotation in scaled axis-angle representation (radians).
qGuessVector describing current position in joint space (meters or degrees).
qVector describing target position in joint space (meters or degrees).
framePoints at the frame the desired position is expressed in.
Returns
true on success, false otherwise

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.

◆ poseDiff()

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::poseDiff ( const std::vector< double > &  xLhs,
const std::vector< double > &  xRhs,
std::vector< double > &  xOut 
)
pure virtual

The result is an infinitesimal displacement twist, i.e. a vector, for which the operation of addition makes physical sense.

Parameters
xLhs6-element vector describing a pose in cartesian space (left hand side); first three elements denote translation (meters), last three denote rotation in scaled axis-angle representation (radians).
xRhs6-element vector describing a pose in cartesian space (right hand side); first three elements denote translation (meters), last three denote rotation in scaled axis-angle representation (radians).
xOut6-element vector describing a pose in cartesian space (result); first three elements denote translation (meters), last three denote rotation in scaled axis-angle representation (radians).
Returns
true on success, false otherwise

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.

◆ restoreOriginalChain()

virtual yarp::dev::ReturnValue roboticslab::ICartesianSolver::restoreOriginalChain ( )
pure virtual
Returns
true on success, false otherwise

Implemented in AsibotSolver, KdlSolver, and KdlTreeSolver.


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