Re: KDL in ROS - error in kdl/jntspaceinertiamatrix.hpp?
Ruben Smits <[email protected]> Thu, 18 Sep 2014 11:39:24 +0200
| Newsgroups | gmane.science.robotics.orocos.devel |
|---|---|
| Message-ID | <CAN8Phbks24zyAUgPQU+eKa7NVWPziY07BGn67dSO-jDb41OWaw@mail.gmail.com> |
Hi Nicola, On Thu, Sep 18, 2014 at 9:44 AM, Nicola Pedrocchi < [email protected]> wrote: > Hi, > > I’ve encountered a small error in compiling the KDL library from ROS > repository in a Debian stable PC. > > I’ve found that in “kdl/jntspaceinertiamatrix.hpp” the function *Multiply(const > KDL::JntArray&, const double&, KDL::JntArray&)* is indicated as friend in > the declaration of the JntSpaceInertiaMatrix class, but it is not declared > externally to the class – even though it is correctly defined in the > jntspaceinertiamatrix.cpp. > > > > Below you find the test that has arisen the problem: > > > > 1. I’ve compiled also the “models”, that is, in the cmake > configuration I have imposed –DBUILD_MODELS=ON -DBUILD_MODELS_DEMO=ON > > 2. I’ve made a slight modification to the kukaLWRtestHCG.cpp: I’ve > commented the using namespace KDL ( I’ve commented line 11 as below ) > > 3. Then, I’ve added manually the KDL namespace everywhere needed. > > 4. In compiling I’ve got the following error: > > > > *../orocos_kinematics_dynamics/orocos_kdl/models/kukaLWRtestHCG.cpp: In > function ‘int main(int, char**)’:* > > *…/orocos_kinematics_dynamics/orocos_kdl/models/kukaLWRtestHCG.cpp:55:37: > error: invalid initialization of reference of type ‘const KDL::JntArray&’ > from expression of type ‘KDL::JntSpaceInertiaMatrix’* > > *In file included from > …/orocos_kinematics_dynamics/orocos_kdl/src/frames_io.hpp:81:0,* > > * from > ../orocos_kinematics_dynamics/orocos_kdl/models/kukaLWRtestHCG.cpp:3:* > > *…/orocos_kinematics_dynamics/orocos_kdl/src/jntarray.hpp:182:10: error: > in passing argument 1 of ‘void KDL::Multiply(const KDL::JntArray&, const > double&, KDL::JntArray&)’* > > > > Could tell us which compiler you are using in what kind of OS? Ruben > 5. The problem has been solved by adding the declaration of *Multiply(const > KDL::JntArray&, const double&, KDL::JntArray&) *outside the class > JntSpaceInertiaMatrix. > > > > I am not a skilled programmer, is it correct what I have done? > > > > Nicola > > > > > > -- > > Eng. Nicola Pedrocchi, PhD, Researcher > > Institute of Industrial Technology and Automation > > National Council of Research > > Via Bassini, 15, 20133, Milan, Italy > > > > office : +390223699625 > > lab. : +390223699944 > > mobile : +393665797833 > > skypeid: nicola.pedrocchi > > > > -- > Orocos-Dev mailing list > [email protected] > http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev > > -- Ruben Smits, CTO +32 479 511 786 Intermodalics - Kapeldreef 60, 3001 Heverlee - BELGIUM www.intermodalics.eu --------------------------------------------------------------------------------------------------------------------------------------- This email and any attached files are confidential and may be legally privileged. Any copy, print or forward of this email, without the agreement of sender or addressee, is strictly prohibited. Misuse is a violation of the law on personal data protection (D. Lgs. 196/2003) and on secrecy of correspondence (art. 616 cp). If you have received this transmission in error please notify the sender immediately and then delete this email and any attached files. -- Orocos-Dev mailing list [email protected] http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev