User login

Force Sensor

Force sensors are now available on UWSim. It measures the external forces on a part of a vehicle. It can be added to every visual part of a vehicle and it will measure the collision forces the piece is suffering in Newtons force torque.

This sensor uses Bullet physics engine to create two identical collision shapes one colliding with external objects and one "ghost" that traverses them, at the end of each physics iteration measuring the difference between these two collision shapes allows us to calculate the force suffered by the object. Physical properties of the vehicle part such as weight should be correctly provided on URDF to obtain realistic results. For instance, this sensor has been used to measure collision forces of the girona500 vehicle and send this information to underwater vehicle dynamics module which uses it as an input for external forces, the result is vehicle can no longer traverse objects as we can see in the embedded video. The XML code needed to add one is:

  <ForceSensor>
    <name>ForceG500</name>
    <target>base_link</target>
    <offsetp>
      <x>-0.2</x>
      <y>0.75</y>
      <z>0</z>
    </offsetp>
    <offsetr>
      <x>-1.57</x>
      <y>0</y>
      <z>3.14</z>
    </offsetr>
  </ForceSensor>

The example shows that only a target and offset from the part's center is needed to add a force sensor. The measured force can be published in ROS by adding the following lines inside the rosInterfaces block of your XML:

  <ForceSensorROS>
    <name>ForceG500</name>
    <topic>g500/ForceSensor</topic>
    <rate>100</rate>
  </ForceSensorROS>