graspit-simulator / graspit

The GraspIt! simulator
http://graspit-simulator.github.io/
Other
166 stars 80 forks source link

Dynamics engines not working properly in GraspIt #152

Open fbottarel opened 5 years ago

fbottarel commented 5 years ago

Hello, I have downloaded and compiled successfully the simulator. I can load any example and run any tutorial except the one regarding dynamics (worlds/barrettGlassDyn.xml). The scene loads up, but it appears like the hand is already in contact with the table, therefore the Auto-Grasp doesn't do anything. I get the following console output:

Using default inertia matrix
Using default center of gravity
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts
Collision found when looking for contacts

Moreover, if I try to start the dynamics simulation nothing happens in the GUI, and the time counter does not move from 00.00. Nothing moves in the scene. I only get a Timestep failsafe reached. warning as console output. However, pausing the simulation brings up another warning

Coin warning in SbRotation::setValue(): rotateTo argument has zero length.
Coin warning in SbRotation::setValue(): rotateTo argument has zero length.
Delta failsafe due to collision: table and _chain1_link2

Unpausing the simulation doesn't fix things. I compiled the simulator with both the graspit dynamics engine and Bullet, none work (using bullet makes the sim crash, but I think I haven't compiled it corectly). These errors consistently showed up for me on 3 different machines, running Ubuntu 16.04, 14.04 and 18.04.

I wonder if anyone has any clue about what is going on here.

rojikada commented 5 years ago

Had same problem, reinstalling from git, but using tag 3.0 worked for me. But still getting LCP could not be solved.

fbottarel commented 5 years ago

@wutter have you tried with bullet as well?

rojikada commented 5 years ago

Cool, that works! Now only problem is that the whole arm just goes bananas 😄, using bullet tag 2.88, meby older version would do better.

By https://graspit-simulator.github.io/build/html/dynamics.html#bullet-dynamics 2.83.7 was tested. Can't get it working (crashes on start - SIGSEGV memory read). Using Ubuntu 18.04.

fbottarel commented 5 years ago

@wutter let me know if you make any advancement. I am just about to give up on graspit

rojikada commented 5 years ago

Found out you can get Bullet without compiling, on clean install of ubuntu 18.04 this should get it all prepared: sudo apt-get install make gcc libqt4-dev libqt4-opengl-dev libqt4-sql-psql libcoin80-dev libsoqt4-dev libblas-dev liblapack-dev libqhull-dev libeigen3-dev libcanberra-gtk-module libcanberra-gtk3-module cmake-curses-gui git libbullet-dev libbullet-extras-dev libbullet2.87 libbullet-extras2.87 libbulletml0v5 libbulletml-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev

with this setup I do not get memory leak crashes, but multiple robot-bodies connected still seem to be broken. When using it with only one robot, it seems kinda OK, until collision occurs, as when that happens, GraspIt! gets stuck in a loop saying "Collision found when looking for contacts".