justagist / panda_simulator

A Gazebo simulator for the Franka Emika Panda robot with ROS interface, supporting sim-to-real code transfer (Python). Exposes customisable controllers and state feedback from robot in simulation.
Apache License 2.0
188 stars 58 forks source link

const class KDL::Joint’ has no member named ‘getInertia #36

Closed upuphero closed 3 years ago

upuphero commented 3 years ago

There is a problem when I catkin_make about this package

/home/ye/finalyearproject/src/panda_simulator/panda_gazebo/src/kdl_methods.cpp: In member function ‘virtual int panda_gazebo::KDLMethods::RNECartToJnt(const KDL::JntArray&, const KDL::JntArray&, const KDL::JntArray&, const Wrenches&, KDL::JntArray&, KDL::Twist)’:/home/ye/finalyearproject/src/panda_simulator/panda_gazebo/src/kdlmethods.cpp:119:61: error: ‘const class KDL::Joint’ has no member named ‘getInertia’; did you mean ‘inertia’? torques(j)+=chain.getSegment(i).getJoint().getInertia()*q_dotdot(j); // add torque from joint inertia ^~~~~~ inertia /home/ye/finalyearproject/src/panda_simulator/panda_gazebo/src/kdl_methods.cpp: In member function ‘virtual int panda_gazebo::KDLMethods::JntToMass(const KDL::JntArray&, KDL::JntSpaceInertiaMatrix&)’: /home/ye/finalyearproject/src/panda_simulator/panda_gazebo/src/kdlmethods.cpp:227:51: error: ‘const class KDL::Joint’ has no member named ‘getInertia’; did you mean ‘inertia’? H(k,k)+=chain.getSegment(i).getJoint().getInertia(); // add joint inertia ^~~~~~ inertia panda_simulator/panda_gazebo/CMakeFiles/panda_gazebo_ros_control.dir/build.make:134: recipe for target 'panda_simulator/panda_gazebo/CMakeFiles/panda_gazebo_ros_control.dir/src/kdl_methods.cpp.o' failed`

I am trying to figure out what is wrong with this inertia? And if I replace the getInertia with inertia but it shows that opt/ros/melodic/include/kdl/joint.hpp:202:16: note: declared private here

justagist commented 3 years ago

You have to build a specific version of orocos_kinematics_dynamics package as mentioned in the readme.

cd orocos_kinematics_dynamics && git checkout b35c424e77ebc5b7e6f1c5e5c34f8a4666fbf5bc
upuphero commented 3 years ago

Thanks a lot!!! I will try when the power is back