I see that there are 2 methods to get contact forces: 1) placing a sensor 2) acquire_net_force_tensor(), what is the difference between them?
In my example, I placed a sensor at the bottom of the cart
sensor_pose1 = gymapi.Transform(gymapi.Vec3(0, 0.0, -0.125))
sensor1 = gym.create_force_sensor(env, ball_handle, sensor_pose1)
when printing the values from the sensor and from acquire_net_contact_force_tensor(), the forces do not correspond:
With the tensor API, make sure you are calling refresh_net_contact_force_tensor for net contact forces or refresh_force_sensor_tensor for force sensors before reading the values from the buffer to retrieve the latest data from simulation. More documentation of force sensors can be found in the docs under programming/forcesensors.