Model mass not updating in Gazebo [closed]

asked 2019-11-01 08:40:29 -0600

PaulD gravatar image

Hi, I am using Gazebo version 9.11 with ROS-Melodic on Ubuntu 18.04.

I have a URDF that describes a boat. I have attached another link to the boat which acts as a payload, but is just a cylinder in practice. So I basically have base_link <---> payload_link, with the interconnection being a joint of type "revolute".

I would like to be able to increase/decrease the weight of the payload while the simulation is already running. I have tried using rosservice call /gazebo/set_link_properties, to update the mass this way. However, it does not affect the simulation. For example, if I update the mass of the cylinder to be 300 kg while Gazebo is running, the rosservice gives a successful message and the link property in the gazebo gui panel shows this update, but the boat itself remains unchanged. However if I set the mass of the cylinder to be 300kg in the urdf file, and then start the simulation, it does take effect and the boat immediately sinks.

I am relatively new to Gazebo and Ros so I am not sure how the Physics engine works, but I suspect it may be the problem. Any tips and suggestions would be much appreciated.

edit retag flag offensive reopen merge delete

Closed for the following reason Gazebo Question: The Gazebo community prefers to answer questions at: http://answers.gazebosim.org by gvdhoorn
close date 2019-11-02 08:51:54.951892

Comments

Seeing as the service call seems to be successful (as the Gazebo UI updates), I would suggest to post this on the Gazebo Answers forum. It would seem specific to how Gazebo functions. Perhaps the ROS plugin does something wrong, but for now it seems like a Gazebo issue.

If you post on Gazebo Answers, please post a link here in a comment to make sure we keep things connected.

gvdhoorn gravatar imagegvdhoorn ( 2019-11-02 08:51:43 -0600 )edit