graspit-simulator / graspit

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

Bullet Dynamics Can't Start #106

Closed ilaplace closed 7 years ago

ilaplace commented 7 years ago

Since I couldn’t resolve my issue: https://github.com/graspit-simulator/graspit/issues/103

I wanted to use bullet dynamics since I need gravity. I followed the tutorial http://graspit-simulator.github.io/build/html/dynamics.html. But it seems like it doesn't work, I keep getting the same errors.

jvarley commented 7 years ago

I have been a bit busy, but will look over the dynamics issues soon.

You should definitely not be getting the same error with Bullet though as it does not use the LCP solver inside GraspIt!. You may want to rm -rf your build directory, and change the CMakeLists.txt to use bullet specifically change this line:

set(DYNAMICS_ENGINE GRASPIT_DYNAMICS CACHE PATH "back end for GraspIt! Dynamics, current options are GRASPIT_DYNAMICS, BULLET_DYNAMICS")

to

set(DYNAMICS_ENGINE BULLET_DYNAMICS CACHE PATH "back end for GraspIt! Dynamics, current options are GRASPIT_DYNAMICS, BULLET_DYNAMICS")

and then rerun:

mkdir build
cd build
cmake ..
make -j5

We also made a rather large change to GraspIt!, removing its older custom math library and replacing most of the functionality with Eigen. It maybe worth checking out an older commit of GraspIt! prior to the switch to Eigen and seeing if that it works as planned. Maybe give this one a try: https://github.com/GraspControl/graspit/tree/aeb9972a56d8e7326d639138e24bc9e645fd815f

jvarley commented 7 years ago

Does the dynamics engine run for you on the plannerMug.xml world, using either bullet or graspit dynamics?

jvarley commented 7 years ago

You can add gravity in Bullet using: https://github.com/graspit-simulator/graspit/blob/master/src/dynamics/bulletDynamics.cpp#L67

ilaplace commented 7 years ago

After I've created build folder under graspit_source, I'm not getting LCP errors, When first start it asks me this: graspit

I could not run dynamic engine in any world files, Currently It seems like when dynamic is somehow on, in the planner mug, although after I've made auto-grasp it didn't made any contact: image

In barretGlassDyn things go pretty weird: image

Dlr world goes crazy too: image

By the way I can't get torque and force feedback without engine, can I?

jvarley commented 7 years ago

Can you try followign the readme here: https://github.com/GraspControl/grasp_control_ws

This was how I was running dynamics inside graspit several months ago. It should work fine without bullet at least for the barrett hand with the mug. Take a peek at

https://github.com/GraspControl/grasp_controller/blob/master/grasp_controller.py

before you run it to get a feel for what it does.

The dynamics engine doesn't always work perfectly in terms of mirroring what would happen in the real world, but what you are posting does not look like normal behavior.

ilaplace commented 7 years ago

It works exactly the same although I did something tiny different: 'wstool update' didn't work for me since I have an SSH issue or something, so I manually downloaded graspit-ros under the GraspControl repo, maybe I got the wrong version of it?

By the way another thing I did different was to configure Bullet Dynamics with editing the file: /home/ilaplace/ctrl_grasp_ws/src/graspit-ros/graspit/graspit_source/CMakeCache.txt since I could not save the changes with ccmake.

jvarley commented 7 years ago

If you follow the Readme from: https://github.com/GraspControl/grasp_control_ws

Without Bullet it still doesn't work?

ilaplace commented 7 years ago

Nothing seems different, same bullet engine issues, and the same grasp dynamic ones

jvarley commented 7 years ago

So when you run grasp_controller.py you don't end up with the hand in a reasonable configuration around the mug?

ilaplace commented 7 years ago

No, it works fine, but when start simulation thing go crazy, and it seems like setting up bullet messes ros servies, when launch rqt I'm getting;

Unable to load type [graspit_interface/SetRobotDOFForces].
Have you typed 'make' in [graspit_interface]?
ServiceCaller.on_refresh_services_button_clicked(): could not get class of service /stepDynamics:
Unable to load type [graspit_interface/StepDynamics].
Have you typed 'make' in [graspit_interface]?
ServiceCaller.on_refresh_services_button_clicked(): could not get class of service /toggleDynamicsController:
Unable to load type [graspit_interface/ToggleDynamicsController].
Have you typed 'make' in [graspit_interface]?
jvarley commented 7 years ago

the rqt errors are because the fork of graspit_interface in graspcontrol has additional services related to controlling a robot in dynamics mode (SetRobotDOFForces, StepDynamics, ToggleDynamicsController) that do not exist in the main graspit_interface repo at this time.