Ask Your Question

very strange stuff in rviz

asked 2012-06-08 01:02:41 -0600

Lucian gravatar image

Hello everybody,

I've been working for some time now on the assembly of a robotic arm from different stl parts. I don't have the original CAD model so I must do everything only with the stl files.

I don't know the distance between the joints either so I have to find it out by guessing-and-correcting, which is very annoying. However I noticed that sometimes rviz "guesses" the right position by himself, thus fitting the parts almost exactly. If I try to change the origin of the joint only a bit in the .urdf file it still stays at the same place!

This is of course wonderful when you have simple geometries (mother- father plugins for example) but it can be also very annoying with more complex parts, when rviz fits by itslef parts in the WRONG position.

Why does rviz fit by itself parts anyway? Did anyone notice this behavior? It seems to me very strange. Does anyone know how to control/avoid this behavior?

Any clue or hint would be useful, please do tell me if you have the slightest guess

Thanks a lot

edit retag flag offensive close merge delete


None of that is controlled by rviz. You can use the rviz TF Display to see what description your system is publishing.

joq gravatar image joq  ( 2012-06-08 05:14:05 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2012-06-08 01:11:55 -0600

rviz does not guess any transformations between robot parts, but strictly shows what is defined in URDF robot models. If the transformation between parts is not properly published, all parts will be shown on top of each other at the current fixed coordinate system's origin, which might look like some sort of 'auto alignment' in some cases. Could this be what you're seeing?

edit flag offensive delete link more

answered 2012-06-08 04:11:36 -0600

Lucian gravatar image

updated 2012-06-08 04:30:59 -0600

Hello Stefan,

I do understand what your are talking about, and I thank you for your time, but this is not the case, I am quite sure about it. With complex models weird things happen: for instance by launching the same model two times in a row I happen -and very often !- to get different alignments for one joint. How could this be possible, without changing the urdf? It is very intriguing. Furthermore, changing the origin with a non-neglectable offset would often NOT produce any changes!

And there is more! I had a complicated 7-joint robot arm to assemble without knowing the exact distances and I tried to do it by iterative guessing. When I was close enough rviz connected the two stl by himself

My guess is that there has to be an algorithm in rviz/gazebo which detects the good matches between different faces (set of triangles) in an stl geometry and fits them together. (By the way, Meshlab does it automaticaly, but I don't know why and how either )

Does anyone have any precise idea?


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-06-08 01:02:41 -0600

Seen: 223 times

Last updated: Jun 08 '12