Acceleration generated incorrectly when setting force command from ROS

asked 2019-07-29 18:34:01 -0500

baymax gravatar image

I have created a simple plugin that creates a ros node, subscribes to a rostopic to receive force data and apply it to a block of unit mass in the X direction. However I am having issues with the acceleration generated when the force is set from the ros callback function. The image below shows the plots of acceleration, velocity and position in X when a force of 15N is applied to the block.

image description

When the force is set directly in the OnUpdate() function, I can see a constant acceleration as expected.

image description.

I have also attached the code to create my plugin. Am I doing something incorrectly in the callback function?



I am using gazebo 9.10 with ros kinetic on ubuntu xenial.

edit retag flag offensive close merge delete