-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix object pose by removing redundant z_min correction. #15
Fix object pose by removing redundant z_min correction. #15
Conversation
I tested this change and it effectively does what it says. Proof: @toliver I'm noticing that your mesh from OrkObject is correctly visualized. Did you fix that? I have this gray big things appearing around. Also, does the detection work with many objects for you? |
Fix object pose by removing redundant z_min correction.
@awesomebytes Yes, sorry about that. I should have said that the mesh was correctly shown because of a quick dirty hack that I did to get around wg-perception/object_recognition_ros#15 As per the detection, I have only tried with 2 different objects in the DB for the moment. And they were correctly recognised, but I haven't tested this bit very thoroughly (i.e. with other unknown objects involved). |
@toliver It's nice you showed the mesh thingy working as we got to fix it yesterday thanks to that. I have an energy drink bottle, a mug, a pringles can and an aquarius can for now. The pringles are detected all the time, but the rest of the stuff very rarely. If you could try with a couple more objects it would be great. If it works for you I'm maybe doing something wrong. |
Hi @hris2003. I have just had a look at the code in this commit again (although I'm unable to test it right now) and I am not sure that it makes sense. I don't know why it did solve my issue (but it did). The tabletop node is reading a mesh from DB, then subtracting the minimum z to it and adding it to the object recognizer. But for some reason this logic behaviour didn't work for my object as shown in the screenshots further up. Here you can see the position of the object mesh I was using w.r.t the z axis. (it is 2 or 3 cm above the xy plane). I would need to dig a bit deeper to find out what happened but I can't do it right now. Sorry. I can make the mesh available to you if you want to give it a try. |
Thx for the answer. Actually, we figured out that assimp opposites the z values when loading the mesh .... So that will be fixed in a patch soon. |
Well, that certainly explains the offset. (Sorry for introducing a new bug :S ) |
@hris2003 , did that ever get fixed ? |
Yes, the current version of tabletop fixes that issue. Users need to pay
|
From my experience, the rendere coke mesh in rviz depends somehow on the then in rviz you have the mesh viewed as in your case (mesh going thought If you have a mesh like this: [image: Inline image 1] So, tabletop users need to be careful about the mesh origin of their There're sure several way to make rviz render the mesh correctly on the Personally, I prefer letting the user decide the origin of their mesh when Ha. On Mon, Oct 27, 2014 at 12:45 AM, Vincent Rabaud [email protected]
|
The min_z is subtracted twice.
First the mesh vertices are offset so that z=0 is the minimum for the mesh (in https://github.com/shadow-robot/tabletop/blob/a107a368d019557b69b77f281561fd80a8ac528b/src/object/ObjectRecognizer.cpp#L184)
Then the pose found for the object is offset again, leading to a wrong position for the object, as shown in the following image:
Using the correction in this pull request the pose is in the right place (see the cam RGB image on the right side of the rviz screen):