robotology / cer

Contains SW specific to the R1 robots
GNU General Public License v2.0
10 stars 13 forks source link

GazeboYarpPlugin stuck from gazebo10 #111

Closed vvasco closed 4 years ago

vvasco commented 4 years ago

Starting from gazebo10, GazeboYarpPlugin gets stuck here: https://github.com/robotology/cer/blob/449c4c909b1fbe20169637dfcb7779d0e6fced56/gazeboYarpPlugin/GazeboTripodMotionControl.cpp#L754

The result is that when trying to insert cer-sim into gazebo gui, even if the robot is visible and all the ports are opened, the robot is not loaded correctly:

I will have a look to see if I understand what's going on.

Note: if switching to gazebo9 everything works.

cc @pattacini @traversaro @Nicogene

traversaro commented 4 years ago

It seems that that plugin copied code from an old version of gazebo_yarp_controlboard , that send the torque to the gazebo physics engine via a complex pub/sub system, even if both that code and the code that reads the torque are actually executed by the same thread (the main physics thread of Gazebo).

This fortunatly was fixed by https://github.com/robotology/gazebo-yarp-plugins/pull/324 , and you can find more detail in https://github.com/robotology/gazebo-yarp-plugins/issues/165 .

Doing the same change in that plugin should be trivial, as as far as I understand, you only need to set the generalized force to the lower level joint.

vvasco commented 4 years ago

Solved in #115.