RobWorkProject  23.9.11-
Public Member Functions | List of all members
AmbiguityResolver Class Reference

Wraps a InvKinSolver and searches for ambiguities due to joint able to rotate \( 2 \ pi \) or more. More...

#include <AmbiguityResolver.hpp>

Inherits InvKinSolver.

Public Member Functions

 AmbiguityResolver (const rw::core::Ptr< rw::invkin::InvKinSolver > &invkin, rw::core::Ptr< rw::models::JointDevice > device)
 Constructs an AmbiguityResolver. More...
 
 ~AmbiguityResolver (void)
 Destructor.
 
virtual std::vector< rw::math::Qsolve (const rw::math::Transform3D< double > &baseTend, const class rw::kinematics::State &state) const
 Calls the InvKinSolver provided and resolves ambiguities. More...
 
virtual void setCheckJointLimits (bool check)
 No effect. The AmbiguityResolver always tests for joint limits.
 
virtual rw::core::Ptr< const rw::kinematics::FramegetTCP () const
 Returns the Tool Center Point (TCP) used when solving the IK problem. More...
 
- Public Member Functions inherited from InvKinSolver
virtual ~InvKinSolver ()
 destructor
 
virtual std::vector< math::Qsolve (const rw::math::Transform3D< double > &baseTend, const rw::kinematics::State &state) const =0
 Calculates the inverse kinematics. More...
 

Additional Inherited Members

- Public Types inherited from InvKinSolver
typedef rw::core::Ptr< InvKinSolverPtr
 smart pointer type to this class
 
typedef rw::core::Ptr< const InvKinSolverCPtr
 smart pointer type to this const class
 

Detailed Description

Wraps a InvKinSolver and searches for ambiguities due to joint able to rotate \( 2 \ pi \) or more.

For each solution \(\mathbf{q}\) the method tries to see if a \( j \) exists s.t. \( \mathbf{q}(i)=\mathbf{q}(i)+j * 2 \ pi \) is a valid solution.

The AmbiguityResolver always tests for joint limits.

Constructor & Destructor Documentation

◆ AmbiguityResolver()

Constructs an AmbiguityResolver.

Parameters
invkin[in] The inverse kinematics solver to obtain solutions from
device[in] the device for which to calculate inverse kinematics

Member Function Documentation

◆ getTCP()

virtual rw::core::Ptr<const rw::kinematics::Frame> getTCP ( ) const
virtual

Returns the Tool Center Point (TCP) used when solving the IK problem.

Returns
The TCP Frame used when solving the IK.

Implements InvKinSolver.

◆ solve()

virtual std::vector<rw::math::Q> solve ( const rw::math::Transform3D< double > &  baseTend,
const class rw::kinematics::State state 
) const
virtual

Calls the InvKinSolver provided and resolves ambiguities.

Calculates the inverse kinematics. Given a desired \(\robabx{}{desired}{\mathbf{T}}\) and the current state, the method solves the inverse kinematics problem.

If the algorithm is able to identify multiple solutions (e.g. elbow up and down) it will return all of these. Before returning a solution, they may be checked to be within the bounds of the configuration space. (See setCheckJointLimits(bool) )

Parameters
baseTend[in] Desired base to end transformation \( \robabx{}{desired}{\mathbf{T}}\)
state[in] State of the device from which to start the iterations
Returns
List of solutions. Notice that the list may be empty.
Note
The targets baseTend must be defined relative to the base of the robot/device.

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