Get forces acting on link from specific sources

asked 2019-09-04 08:42:30 -0500

kumpakri gravatar image

Is it possible to distinguish source of the force acting on the link? When I watch the values returned by the GetRelativeForce() method, the values are very inconsistent and I cannot make sense of them. If I apply a force on the link, for example using this command

rosservice call /gazebo/apply_body_wrench "body_name: 'box::link'
reference_frame: 'box::link'
reference_point: {x: 0.0, y: 0.0, z: 0.0}
wrench:
  force: {x: 0.0, y: -120.0, z: 0.0}
  torque: {x: 0.0, y: 0.0, z: 0.0}
start_time: {secs: 0, nsecs: 0}
duration: {secs: 0, nsecs: 500000000}"

I would expect a force of 120 N in y direction to be applied for the whole 0.5 second. But I'm getting force readings as shown below.

-0.001185 -0.001595 105.226
-0.113953 45.3946 -52.6053 
-0.192528 98.0009 0.001104 
-0.192528 98.0009 0.001104
0 0 195.984 
0 0 195.984
-0.187531 98.0074 0.007606
-0.187531 98.0074 0.007606 
-0.000241 9.5e-05 -24.804 
0.000113 0.000197 49.6015 
0.000113 0.000197 49.6015
9.29994 39.5581 -58.4613
-40.1694 329.997 232.059 
-40.1694 329.997 232.059

So this does not seem to make much sense. I want to know the external forces pushing on the link, like if I use the command above or if some other object in the simulation pushes this link.

edit retag flag offensive close merge delete

Comments

1

I don't think there's an easy way of breaking down the force components. In your specific case, there could be the effects of gravity and friction involved.

chapulina gravatar imagechapulina ( 2019-09-04 10:53:20 -0500 )edit