i am new to pybullet and wanted to simulate a UR5 bot doing ultrasound on humans. For that i've loaded a ur5 bot and a soccerball{example for human) , i want the end effector to apply a constant 2N force on the surface of the Soccer while moving and always being in contact with it. i know i have to apply a joint force of( J^T F ) on the joint , but i dont know how to write the code. ALso the pybullet quickstart guide is of little help. Thanks for reading,looking forward to a positive reply.
i tried loading the ur5 and ball in the environment and know how to use the necessary functions to find inverse kinematics,dynamics and torque control etc. However i dont know how to control the end effector to be always in contact with the surface and apply a constant force.