Gazebo | Ignition | Community
Ask Your Question

What is the difference between red and green contact force visualization in Gazebo client?

asked 2014-11-10 06:18:42 -0600

peci1 gravatar image

When 2 bodies are colliding and I set Gazebo (2.2) to show contacts, there is a blue ball and a line for each contact point. The lines are either red or green.

What do the colors mean?

My estimate is that green is for normal collisions, whereas red is for penetration (which should not occur with rigid bodies).

I assume these two cases can be distinguished using the contact depth information provided in the contact message, and that there is a threshold to tell if the line should be green or red. Where is the definition of the threshold? Or am I completely wrong?

edit retag flag offensive close merge delete


Can you tell me how to visualization the force in gazebo? I mean, as I know, the visualization can only done by rviz, and I am curious about how to do that in gazebo. Or you can post some reference link here. Thanks!

littleghost gravatar imagelittleghost ( 2018-06-07 22:08:17 -0600 )edit

@littleghost, that sounds like a new question, feel free to post a new one

chapulina gravatar imagechapulina ( 2018-06-08 12:07:21 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-12-02 16:04:17 -0600

nkoenig gravatar image

Green is the normal vector, and red is the depth. The depth line is scaled by a factor of 10.

edit flag offensive delete link more


Does the length of the green line (gazebo 7) indicate anything? I noticed it is different length for different models.

kumpakri gravatar imagekumpakri ( 2020-07-17 03:50:16 -0600 )edit

I see in the code from the scpeters's answer that the length is scaled with some 'force' of the contact. What is this force? Is it the force the ground is pushing on the model in contact or is it the error correcting force?

kumpakri gravatar imagekumpakri ( 2020-07-17 06:40:19 -0600 )edit

answered 2014-12-02 15:46:38 -0600

scpeters gravatar image

The relevant code is in gazebo::rendering::ContactVisual::Update, though I'm not sure exactly what it's doing.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools



Asked: 2014-11-10 06:18:42 -0600

Seen: 836 times

Last updated: Dec 02 '14