ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to dynamically update mass/center of mass/inertia during Gazebo sim

asked 2017-04-06 01:47:03 -0500

r0salesr gravatar image


Components in the URDF files can be assigned static mass, center of mass, and inertial matrix.

Is there a way to update those values dynamically once the Gazebo simulation environment has started up?

For example, say I had a fuel tank on a robot and I wanted to decrease the weight and center of mass of the tank as a function of engine power output over time. Or maybe I have a robot expelling a liquid from a holding tank or sucking up a liquid into a holding tank.

I can't seem to find a solution to this in the ROS docs.

Thank you, Randy

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-04-07 00:21:27 -0500

r0salesr gravatar image

Yep...just needed to look a little longer. The GetMass() and SetMass functions in the Gazebo inertial physics library had what I wanted.

Thanks! Randy

edit flag offensive delete link more

answered 2017-04-06 04:47:17 -0500

duck-development gravatar image

I think you can find the answer here:

edit flag offensive delete link more

Question Tools


Asked: 2017-04-06 01:47:03 -0500

Seen: 2,469 times

Last updated: Apr 07 '17