joao-borrego / grasp

Grasping in GAZEBO robotics simulator.
MIT License
87 stars 16 forks source link

Error with dart engine - seems like gazebo ros packages does not support dart engine? #15

Closed aprath1 closed 2 years ago

aprath1 commented 2 years ago

Hi @jsbruglie ,

I am trying to run the example in this repo and I get an error: ROS get_physics_properties service call does not yet support physics engine [dart].

I installed the gazebo_ros_pkgs as per the setup instructions and cloning the kinetic-devel branch git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git -b kinetic-devel

Also in the gazebo_ros_pkgs repo the file -> gazebo_ros_pkgs/gazebo_ros/src/gazebo_ros_api_plugin.cpp (line 1442 & 1494) , indicates that the get physics and set physics properties support only ode engine, not dart and bullet as of now... so does it mean dart is not supported ? If so how to run the examples in the repo, am I missing something?

joao-borrego commented 2 years ago

Hi again @aprath1!

I definitely recall that that DART was working with Gazebo, although at the time it meant you'd have to build Gazebo from sources yourself. I ran all my experiments with DART since ODE seemed to be too unstable for precise grasping simulation.

In any case, most of the interaction with the simulator is done directly via the Gazebo C++ API, bypassing ROS completely. In the specific example you mention I seem to recall the only reason to use the gazebo_ros_pkgs module was to effortlessly spawn the robot hand from .urdf files (with this spawn_model command). I think Gazebo itself is launched with rosrun so that gazebo_ros_pkgs is active.

Finally, this warning message feels awfully familiar, and a quick search led me to this and this threads where other users mention the same problem, but claim DART was working just fine in the GUI. However, it may be the case that once you start trying to e.g. control a robot using a ROS module which communicates with Gazebo via gazebo_ros_pkgs it may not work. I did not try this myself. I do believe @el-cangrejo had tried to run control algorithms in a RL scenario using this module (he has his own fork of the repo as well). Perhaps he can help you further?

joao-borrego commented 2 years ago

Also, unrelated, I haven't worked on these topics for 3 years now. Sometimes I think about updating these Gazebo repos since people try running the code from time to time. Honestly, if I were to rebuild this module today I would definitely consider mujoco as the physics simulator. At the time it was closed source and the license fees were hefty. However, deepmind has recently acquired it and plans on making it open source soon. Probably worth keeping an eye out.

aprath1 commented 2 years ago

Hi @jsbruglie ,

Thank you so much for your reply.

Unfortunately got swamped with some works and could not close this issue earlier. I can confirm that the DART is working with Gazebo, for the functionalities based on this grasp repo, even though the above mentioned error is thrown. I had an issue that the simulation was not responding when I use baxter_standard_basic.urdf gripper and this made me wonder if the DART based error thrown by GAZEBO was the reason behind. But using the baxter_extended_round.urdf gripper works well with the example in this repo.