Closed triccyx closed 5 years ago
I guess that is kind of expected, for simulating multiple actuators you can load multiple plugins:
<plugin name="fmi_actuator_plugin1" filename="libFMIActuatorPlugin.so">
<actuator>
<name>myactuator1</name>
<joint>L_AK_R</joint>
<fmu>MotorTransmissionAKR.fmu</fmu>
<actuatorInputName>actuatorInput</actuatorInputName>
<jointPositionName>jointPosition</jointPositionName>
<jointVelocityName>jointVelocity</jointVelocityName>
<jointAccelerationName>jointAcceleration</jointAccelerationName>
<jointTorqueName>jointTorque</jointTorqueName>
</actuator>
</plugin>
<plugin name="fmi_actuator_plugin2" filename="libFMIActuatorPlugin.so">
<actuator>
<name>myactuator2</name>
<joint>L_AK_P</joint>
<fmu>MotorTransmissionAKP.fmu</fmu>
<actuatorInputName>actuatorInput</actuatorInputName>
<jointPositionName>jointPosition</jointPositionName>
<jointVelocityName>jointVelocity</jointVelocityName>
<jointAccelerationName>jointAcceleration</jointAccelerationName>
<jointTorqueName>jointTorque</jointTorqueName>
</actuator>
</plugin>
However, silently failing is indeed bad and confusing. We should either add support for multiple actuators in a single plugin, or print an error if more than one actuator element is a child of the plugin
tag.
I would also add a message to confirm the load of the actuator.
I would also add a message to confirm the load of the actuator.
That make sense as well.
I can confirm that now, multi instantiate the plugin, make all working
In order to obtain the result is necessary to change:
private: FMUActuatorProperties actuator;
to
private: std::vector<FMUActuatorProperties> actuators;
And all the related code in
class FMIActuatorPlugin
This was fixed in https://github.com/robotology/gazebo-fmi/pull/56 , but is probably still not implemented for the single body fluid dynamics plugin.
It seems that the plugin is not able to load multiple FMUs from .sdf file. Only the first is loaded. Consider the following sdf (only the interesting part of the file):
Only the first FMU is loaded.