Skip to content
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

Mesh not loaded correctly (ObjectRecognizer crashes) #11

Closed
toliver opened this issue Mar 3, 2014 · 6 comments
Closed

Mesh not loaded correctly (ObjectRecognizer crashes) #11

toliver opened this issue Mar 3, 2014 · 6 comments

Comments

@toliver
Copy link
Contributor

toliver commented Mar 3, 2014

As discussed in https://groups.google.com/forum/#!topic/object-recognition-kitchen/ijpfJdG9q8E

The ObjectRecognizer.cpp tries to read a mesh called "original" from the DB, but the default way to generate a mesh (i.e. rosrun object_recognition_reconstruction mesh_object --all --commit) doesn't generate a file with such a name.

I modified it to get a bit further. See the following commit.

shadow-robot@2c149db

Then I get the following output. The file is correctly read from the DB, and parsed using the assimp library (aiImportFile()) but for some reason it crashes in line 176 of ObjectRecognizer.cpp (in my modified version) when trying to access the number of indices of the first face of the mesh (face.mNumIndices). This seems to point to a bug in the mesh generator, or a bug in the assimp library. Any ideas?

rosrun object_recognition_core detection -c detection.object.ros.ork 
[ INFO] [1393263269.953285655]: Initialized ROS. node_name: /object_recognition_server
[ INFO] [1393263270.736406354]: System already initialized. node_name: /object_recognition_server
[ INFO] [1393263271.697297591]: System already initialized. node_name: /object_recognition_server
[ INFO] [1393263271.708924056]: Subscribed to topic:/camera/depth_registered/camera_info with queue size of 1
[ INFO] [1393263271.712172667]: Subscribed to topic:/camera/rgb/camera_info with queue size of 1
[ INFO] [1393263271.715300890]: Subscribed to topic:/camera/depth_registered/image with queue size of 1
[ INFO] [1393263271.717938160]: Subscribed to topic:/camera/rgb/image_color with queue size of 1
126 :: 0.5 , 1 , 0.995004 , /base_link , /head_mount_kinect_rgb_optical_frame
Loading model: b34c1fdbfcc566e265f880e1f001353f for object id: b34c1fdbfcc566e265f880e1f000049bInfo,  T0: Load /tmp/filez5OUHT.stl
Info,  T0: Found a matching importer for this file format
Info,  T0: Import root directory is '/tmp/'
Info,  T0: Entering post processing pipeline
Warn,  T0: RemoveVCProcess: AI_CONFIG_PP_RVC_FLAGS is zero.
Info,  T0: Points: 0, Lines: 0, Triangles: 1, Polygons: 0 (Meshes, X = removed)
Warn,  T0: Mesh 0: Not suitable for vcache optimization
Info,  T0: Cache relevant are 0 meshes (0 faces). Average output ACMR is -nan
Info,  T0: Leaving post processing pipeline
Mesh: 0 mNumVertices: 7899
Mesh: 0 mNumFaces: 2633
after 0
face[0] address: 0x3cc10454ba60120c
Segmentation fault (core dumped)
@vrabaud
Copy link
Member

vrabaud commented Mar 3, 2014

hi, I fixed this in trunk, is there any way you can try using the sources ?

@toliver
Copy link
Contributor Author

toliver commented Mar 4, 2014

Yes, I could test with the source, but where did you fix it (i.e. what code should I pull)? (I couldn't see any recent commit in the master branch).

vrabaud added a commit that referenced this issue Mar 4, 2014
@vrabaud
Copy link
Member

vrabaud commented Mar 4, 2014

I fixed your original problem but I also added a mandatory build of Assimp3 (with an updated version), please let me know how that goes.

@toliver
Copy link
Contributor Author

toliver commented Mar 5, 2014

I've just tested it and it works well. Loads the mesh from DB and recognizes the object.

@awesomebytes
Copy link
Member

I can confirm I get detections with tabletop now!
The behaviour is still not exactly what I want but I'll look into it a bit further and see if I can make a pull request with the changes. Also prepare a version that works in simulation with REEM robot so anyone can test in there.

@awesomebytes
Copy link
Member

As this was fixed, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants