robotology / simmechanics-to-urdf

Script for converting simmechanics XML files to URDF
34 stars 8 forks source link

Add parsing of xml blobs in FT sensor gazebo elements #32

Closed nunoguedelha closed 6 years ago

nunoguedelha commented 6 years ago

This change in firstgen.py implements the parsing of a new parameter field, sensorBlobs, in the FT sensors options forceTorqueSensors:, as done already for generic sensors. This blob is a complex XML setting that is included as a child of the FT sensor Gazebo element. We depict below an example of parameters that can be parsed from the yaml configuration file:

...
# Sensors options
forceTorqueSensors:
  - jointName: l_leg_ft_sensor
    directionChildToParent: Yes
    sensorBlobs:
    - |
        <plugin name="left_leg_ft_plugin" filename="libgazebo_yarp_forcetorque.so">
          <yarpConfigurationFile>model://iCub/conf/FT/gazebo_icub_left_leg_ft.ini</yarpConfigurationFile>
        </plugin>
...

This PR also updates the Readme accordingly.

traversaro commented 6 years ago

Ok for me, we can merge as soon as @fiorisi approves.

nunoguedelha commented 6 years ago

I opened this new issue for addressing the new parameter in force torque sensors config interface.

Merging now this PR.