33 #ifndef DART_DYNAMICS_SHAREDLIBRARYIKFAST_HPP_ 34 #define DART_DYNAMICS_SHAREDLIBRARYIKFAST_HPP_ 36 #include "dart/common/SharedLibrary.hpp" 37 #include "dart/dynamics/IkFast.hpp" 65 const std::string& filePath,
66 const std::vector<std::size_t>& dofMap,
67 const std::vector<std::size_t>& freeDofMap,
68 const std::string& methodName =
"IKFast",
69 const Analytical::Properties& properties = Analytical::Properties());
73 -> std::unique_ptr<GradientMethod>
override;
93 const IkReal* targetTranspose,
94 const IkReal* targetRotation,
95 const IkReal* freeParams,
100 const IkReal* parameters,
101 IkReal* targetTranspose,
102 IkReal* targetRotation)
override;
114 using IkFastFuncGetInt = int (*)();
115 using IkFastFuncGetIntPtr =
int* (*)();
116 using IkFastFuncComputeIk = bool (*)(
117 const IkReal* targetTranspose,
118 const IkReal* targetRotation,
119 const IkReal* freeParams,
121 using IkFastFuncComputeFk = void (*)(
122 const IkReal* parameters,
123 IkReal* targetTranspose,
124 IkReal* targetRotation);
125 using IkFastFuncGetConstCharPtr =
const char* (*)();
130 mutable std::shared_ptr<common::SharedLibrary> mSharedLibrary;
132 mutable IkFastFuncGetInt mGetNumFreeParameters;
133 mutable IkFastFuncGetIntPtr mGetFreeParameters;
134 mutable IkFastFuncGetInt mGetNumJoints;
135 mutable IkFastFuncGetInt mGetIkRealSize;
136 mutable IkFastFuncGetInt mGetIkType;
137 mutable IkFastFuncComputeIk mComputeIk;
138 mutable IkFastFuncComputeFk mComputeFk;
139 mutable IkFastFuncGetConstCharPtr mGetKinematicsHash;
140 mutable IkFastFuncGetConstCharPtr mGetIkFastVersion;
146 #endif // DART_DYNAMICS_SHAREDLIBRARYIKFAST_HPP_ void computeFk(const IkReal *parameters, IkReal *targetTranspose, IkReal *targetRotation) override
Computes the forward kinematics solutions using the generated IKFast code.
Definition: SharedLibraryIkFast.cpp:224
The InverseKinematics class provides a convenient way of setting up an IK optimization problem...
Definition: InverseKinematics.hpp:75
int getIkRealSize() const override
Returns the size in bytes of the configured number type.
Definition: SharedLibraryIkFast.cpp:181
const char * getIkFastVersion() override
Returns the IkFast version used to generate this file.
Definition: SharedLibraryIkFast.cpp:251
SharedLibraryIkFast(InverseKinematics *ik, const std::string &filePath, const std::vector< std::size_t > &dofMap, const std::vector< std::size_t > &freeDofMap, const std::string &methodName="IKFast", const Analytical::Properties &properties=Analytical::Properties())
Constructor.
Definition: SharedLibraryIkFast.cpp:73
const char * getKinematicsHash() override
Returns a hash of all the chain values used for double checking that the correct IK is used...
Definition: SharedLibraryIkFast.cpp:238
int getNumJoints() const override
Returns the total number of indices of the chane.
Definition: SharedLibraryIkFast.cpp:168
A base class for IkFast-based analytical inverse kinematics classes.
Definition: IkFast.hpp:50
std::string mFilePath
File path to the ikfast shared library.
Definition: SharedLibraryIkFast.hpp:128
int getNumFreeParameters() const override
Returns the number of free parameters users has to set apriori.
Definition: SharedLibraryIkFast.cpp:142
Definition: Aspect.cpp:40
bool computeIk(const IkReal *targetTranspose, const IkReal *targetRotation, const IkReal *freeParams, ikfast::IkSolutionListBase< IkReal > &solutions) override
Computes the inverse kinematics solutions using the generated IKFast code.
Definition: SharedLibraryIkFast.cpp:207
IkFast-based analytical inverse kinematics class.
Definition: SharedLibraryIkFast.hpp:46
int getIkType() const override
Returns the IK type.
Definition: SharedLibraryIkFast.cpp:194
void configure() const override
Configure IkFast.
Definition: SharedLibraryIkFast.cpp:264
int * getFreeParameters() const override
Returns the indicies of the free parameters indexed by the chain joints.
Definition: SharedLibraryIkFast.cpp:155
auto clone(InverseKinematics *newIK) const -> std::unique_ptr< GradientMethod > override
Enable this GradientMethod to be cloned to a new IK module.
Definition: SharedLibraryIkFast.cpp:129