Showing contact forces visually

Official Python bindings with a focus on reinforcement learning and robotics.
Post Reply
Posts: 2
Joined: Thu Sep 17, 2020 9:03 pm

Showing contact forces visually

Post by joehays »

Does anyone know of a way to graphically show contact forces in the simulation GUI? Are there any examples that show how to do this?
Posts: 4
Joined: Fri Sep 25, 2020 1:49 pm

Re: Showing contact forces visually

Post by jwhitman »

I've never seen an example of that idea in particular, but, it should be possible with the functions getContactPoints and addUserDebugLine. One can get the contact force and normal with getContactPoints, then for each contact use addUserDebugLine to create a line in the direction of the contact force normal and with length proportional to the force magnitude.
Post Reply