KDL in ROS - error in kdl/jntspaceinertiamatrix.hpp?
"Nicola Pedrocchi" <[email protected]> Thu, 18 Sep 2014 09:44:29 +0200
| Newsgroups | gmane.science.robotics.orocos.devel |
|---|---|
| Message-ID | <[email protected]> |
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&)'
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