Home | Tutorials | Wiki | Issues
Ask Your Question
0

Gazebo missing methods GetDamping() and GetUseCFMDamping() for joints

asked 2013-04-06 22:17:44 -0500

cga gravatar image

How do I find out the damping of a joint in Gazebo? There is a SetDamping method for joints, but no GetDamping method. dampingCoefficient is a protected attribute, so I don't know how to access it. Thanks Chris

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-04-08 13:03:41 -0500

hsu gravatar image

ticketed. Without direct access to gazebo API, one can also get the robot parameters from robot URDF stored in ROS parameter /robot_description (just the damping coefficient, not use_cfm_damping).

Non-compilable pseudo-code below:

#include <ros/ros.h>
#include <urdf/model.h>
#include <urdf/link.h>
...
int main(int argc, char** argv)
{
  ros::init( argc, argv, "get_robot_description");
  ros::NodeHandle rosNode;
  std::string urdfString;
  rosNode.getParam("/robot_description", urdfString);
  urdf::Model urdfModel;
  urdfModel.initString(urdfString);
  std::cout << urdfModel->getLink("l_leg_lax")->dynamics->damping << "\n";
  return 0;
}
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-04-06 22:17:44 -0500

Seen: 348 times

Last updated: Apr 08 '13