3#ifndef __KDL_TREE_SOLVER_HPP__
4#define __KDL_TREE_SOLVER_HPP__
10#include <yarp/dev/DeviceDriver.h>
12#include <kdl/tree.hpp>
13#include <kdl/treefksolver.hpp>
14#include <kdl/treeiksolver.hpp>
15#include <kdl/treeidsolver.hpp>
17#include "ICartesianSolver.h"
18#include "KdlTreeSolver_ParamsParser.h"
39 yarp::dev::ReturnValue
getNumJoints(std::size_t & numJoints)
override;
42 yarp::dev::ReturnValue
getNumTcps(std::size_t & numTcps)
override;
45 yarp::dev::ReturnValue
appendLink(
const std::vector<double> & x)
override;
51 yarp::dev::ReturnValue
changeOrigin(
const std::vector<double> & x_old_obj,
const std::vector<double> & x_new_old, std::vector<double> & x_new_obj)
override;
54 yarp::dev::ReturnValue
forwardKinematics(
const std::vector<double> & q, std::vector<double> & x)
override;
57 yarp::dev::ReturnValue
poseDiff(
const std::vector<double> & xLhs,
const std::vector<double> & xRhs, std::vector<double> & xOut)
override;
60 yarp::dev::ReturnValue
inverseKinematics(
const std::vector<double> & xd,
const std::vector<double> & qGuess, std::vector<double> & q,
Frame frame)
override;
63 yarp::dev::ReturnValue
diffInverseKinematics(
const std::vector<double> & q,
const std::vector<double> & xdot, std::vector<double> & qdot,
Frame frame)
override;
66 yarp::dev::ReturnValue
inverseDynamics(
const std::vector<double> & q, std::vector<double> & t)
override;
69 yarp::dev::ReturnValue
inverseDynamics(
const std::vector<double> & q,
const std::vector<double> & qdot,
const std::vector<double> & qdotdot,
70 const std::vector<double> & ftip, std::vector<double> & t,
Frame frame)
override;
74 bool open(yarp::os::Searchable & config)
override;
76 bool close()
override;
79 bool makeTree(
const yarp::os::Searchable & config);
81 std::vector<std::string> endpoints;
82 std::map<std::string, std::string> mergedEndpoints;
86 KDL::TreeFkSolverPos * fkSolverPos {
nullptr};
87 KDL::TreeIkSolverPos * ikSolverPos {
nullptr};
88 KDL::TreeIkSolverVel * ikSolverVel {
nullptr};
89 KDL::TreeIdSolver * idSolver {
nullptr};
Definition KdlTreeSolver_ParamsParser.h:54
The KdlTreeSolver class implements ICartesianSolver.
Definition KdlTreeSolver.hpp:34
yarp::dev::ReturnValue changeOrigin(const std::vector< double > &x_old_obj, const std::vector< double > &x_new_old, std::vector< double > &x_new_obj) override
Change origin in which a pose is expressed.
Definition ICartesianSolverImpl.cpp:52
yarp::dev::ReturnValue appendLink(const std::vector< double > &x) override
Append an additional link.
Definition ICartesianSolverImpl.cpp:36
yarp::dev::ReturnValue inverseKinematics(const std::vector< double > &xd, const std::vector< double > &qGuess, std::vector< double > &q, Frame frame) override
Perform inverse kinematics.
Definition ICartesianSolverImpl.cpp:129
yarp::dev::ReturnValue getNumJoints(std::size_t &numJoints) override
Get number of joints for which the solver has been configured.
Definition ICartesianSolverImpl.cpp:20
yarp::dev::ReturnValue restoreOriginalChain() override
Restore original kinematic chain.
Definition ICartesianSolverImpl.cpp:44
yarp::dev::ReturnValue getNumTcps(std::size_t &numTcps) override
Get number of TCPs for which the solver has been configured.
Definition ICartesianSolverImpl.cpp:28
yarp::dev::ReturnValue inverseDynamics(const std::vector< double > &q, std::vector< double > &t) override
Perform inverse dynamics.
Definition ICartesianSolverImpl.cpp:264
yarp::dev::ReturnValue diffInverseKinematics(const std::vector< double > &q, const std::vector< double > &xdot, std::vector< double > &qdot, Frame frame) override
Perform differential inverse kinematics.
Definition ICartesianSolverImpl.cpp:195
yarp::dev::ReturnValue poseDiff(const std::vector< double > &xLhs, const std::vector< double > &xRhs, std::vector< double > &xOut) override
Obtain difference between supplied pose inputs.
Definition ICartesianSolverImpl.cpp:105
yarp::dev::ReturnValue forwardKinematics(const std::vector< double > &q, std::vector< double > &x) override
Perform forward kinematics.
Definition ICartesianSolverImpl.cpp:75
Abstract base class for a cartesian solver.
Definition ICartesianSolver.h:19
Frame
Lists supported reference frames.
Definition ICartesianSolver.h:23