gazebo-fmi icon indicating copy to clipboard operation
gazebo-fmi copied to clipboard

Test on Gazebo 10 and 11

Open traversaro opened this issue 4 years ago • 3 comments

Until now, the project was tested with Gazebo 7, 8 and 9. However, since the project was developed Gazebo 10 and 11 were released, and apparently in particular Gazebo 11 is not compatible with the plugin as it, see https://github.com/robotology/gazebo-fmi/issues/67 and https://github.com/robotology/gazebo-fmi/issues/71 . This issue will track adding the test for the project in Gazebo 10 and 11 to ensure that it works fine.

traversaro avatar Oct 30 '20 16:10 traversaro

Hello, I managed to build and run the simulation on Ubuntu 20.04, Gazebo 11 and OpenModelica 1.18.0 using the the CMake option CMAKE_BUILD_TYPE=ON.

The problems I had when building was the warning message when generate the fmu:

[ 40%] Generating FMU for model SimpleElectricalActuator
true
true
""
"Warning: SimpleElectricalActuator requested package Modelica of version 3.2.2. Modelica 4.0.0 is used instead which states that it is only compatible with a conversion script. OpenModelica currently does not support conversion scripts and will proceed with potential issues as a result.

That doesn't generate the SimpleElectricalActuator.fmu but I generated it with OpenModelica and copied it into the corresponding directory.

Finally, running Ctest gave the result:

$ ctest [-VV]
Test project /home/uff-xps-8900/fmi/gazebo-fmi/build
    Start 1: GazeboFMIUtilsComputeJointAccelerationTest
1/4 Test #1: GazeboFMIUtilsComputeJointAccelerationTest ...Child aborted***Exception:   5.25 sec
    Start 2: FMIActuatorPluginPositionRegulationTest
2/4 Test #2: FMIActuatorPluginPositionRegulationTest ......   Passed   74.97 sec
    Start 3: FMIActuatorPluginKnownInputTest
3/4 Test #3: FMIActuatorPluginKnownInputTest ..............   Passed   21.37 sec
    Start 4: FMISingleBodyFluidDynamicsPluginTest
4/4 Test #4: FMISingleBodyFluidDynamicsPluginTest .........   Passed   17.33 sec

75% tests passed, 1 tests failed out of 4

Total Test time (real) = 118.93 sec

The following tests FAILED:
	  1 - GazeboFMIUtilsComputeJointAccelerationTest (Child aborted)
Errors while running CTest

How important is that the GazeboFMIUtilsComputeJointAccelerationTest test fails? because I can run the examples examples damped_pendulum.world and simple_electrical_actuator.world

gbrlb avatar Oct 27 '21 18:10 gbrlb

Hi @gbrlb ! I think as long as you do not use the jointAcceleration variable in the actuator plugin (see https://github.com/robotology/gazebo-fmi/blob/v0.1.1/plugins/actuator/README.md) you should be good to go even if the GazeboFMIUtilsComputeJointAccelerationTest fails.

traversaro avatar Oct 28 '21 13:10 traversaro

Hi @traversaro, thank you for the answer, I think the issue is with DART simulation, the other 3 test fished correctly.

1: [Err] [DARTModel.cc:154] DART does not allow joint without child link. Please see issue #914. (https://github.com/osrf/gazebo/issues/914)
1: [Err] [DARTJointPrivate.hh:69] No joint initialized for joint upper_joint
1: GazeboFMIUtilsComputeJointAccelerationTest: /var/lib/jenkins/workspace/gazebo11-debbuilder/build/gazebo-11.8.1/gazebo/physics/dart/DARTJointPrivate.hh:72: void gazebo::physics::DARTJointPrivate::Initialize(): Assertion '(this->dtJoint)&&("dtJoint is null pointer.\n")' failed.

gbrlb avatar Oct 28 '21 19:10 gbrlb