cartesian controller, help for attachTipFrame() #312
-
Please, about cartesian controller (with icub simulator) I was trying the code here Defining a Different Effector. Question 1: which headers should I include for class iCubFinger? #include <iCub/iKin/iKinFwd.h>
#include <iCub/iKin/iKinHlp.h>
#include <iCub/iKin/iKinInv.h>
#include <iCub/iKin/iKinIpOpt.h>
#include <iCub/iKin/iKinSlv.h>
#include <iCub/iKin/iKinVocabs.h> Question 2: should I include some particular library in CMakeLists? CMakeFiles/exe.dir/myIcub.cpp.o: In function `myIcub::initParam(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
myIcub.cpp:(.text+0x5678): undefined reference to `iCub::iKin::iCubFinger::iCubFinger(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
myIcub.cpp:(.text+0x763b): undefined reference to `vtable for iCub::iKin::iCubFinger'
myIcub.cpp:(.text+0x76a8): undefined reference to `iCub::iKin::iKinLimb::~iKinLimb()'
CMakeFiles/exe.dir/myIcub.cpp.o: In function `iCub::iKin::iCubFinger::~iCubFinger()':
myIcub.cpp:(.text._ZN4iCub4iKin10iCubFingerD2Ev[_ZN4iCub4iKin10iCubFingerD5Ev]+0x3): undefined reference to `vtable for iCub::iKin::iCubFinger'
myIcub.cpp:(.text._ZN4iCub4iKin10iCubFingerD2Ev[_ZN4iCub4iKin10iCubFingerD5Ev]+0x5f): undefined reference to `iCub::iKin::iKinLimb::~iKinLimb()'
CMakeFiles/exe.dir/myIcub.cpp.o: In function `iCub::iKin::iCubFinger::~iCubFinger()':
myIcub.cpp:(.text._ZN4iCub4iKin10iCubFingerD0Ev[_ZN4iCub4iKin10iCubFingerD5Ev]+0x3): undefined reference to `vtable for iCub::iKin::iCubFinger'
myIcub.cpp:(.text._ZN4iCub4iKin10iCubFingerD0Ev[_ZN4iCub4iKin10iCubFingerD5Ev]+0x5e): undefined reference to `iCub::iKin::iKinLimb::~iKinLimb()'
collect2: error: ld returned 1 exit status
CMakeFiles/exe.dir/build.make:830: recipe for target 'exe' failed I guess I need the proper library in TARGET_LINK_LIBRARIES, which currently is: TARGET_LINK_LIBRARIES(exe ${OpenCV_LIBS} ${YARP_LIBRARIES} itpp Qt5::Widgets) Thanks, Valerio |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
You ought to:
|
Beta Was this translation helpful? Give feedback.
-
Perfect! Thanks |
Beta Was this translation helpful? Give feedback.
-
Please, I need clarification about the use of code, in particular I'm comparing Defining a Different Effector and How to use the iCubFinger forward kinematics. It is not clear to me if the following piece of code, computing the Matrix tipFrame
must be used only once, during initialisation of cartesian controller, or if I need to recompute it everytime before a call to As I read here, the helper method getChainJoints() is based on the values of encoders, so I was wondering if I need to refresh it -through a call to iencs->getEncoders(encs.data())- before each new cartesian command. |
Beta Was this translation helpful? Give feedback.
-
Anytime you move the finger's joints, then you have to update the matrix In practice, this won't happen so often, thereby the workflow could be:
|
Beta Was this translation helpful? Give feedback.
-
Ok, so if I have to recompute for some reason the index finger joints, I have to redo all the steps you say, right?. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks! |
Beta Was this translation helpful? Give feedback.
Hi @valeriosperati
You ought to:
iKinFwd.h
iKin
, thus: