PickNikRobotics / generate_parameter_library

Declarative ROS 2 Parameters
BSD 3-Clause "New" or "Revised" License
230 stars 43 forks source link

Restore functionality for mapped params with no struct name #185

Closed sea-bass closed 5 months ago

sea-bass commented 5 months ago

This is... not pretty, but it seems to restore the functionality reported in https://github.com/PickNikRobotics/generate_parameter_library/issues/182 without breaking anything else.

@pac48 what do you think? More trouble than it's worth / should this just not be supported?

  __map_joints:
    weight: {
      type: double,
      default_value: 1.0,
      description: "map parameter without struct name",
      validation: {
        gt<>: [0.0],
      }
    }

it also supports nested!

  __map_joints:
    __map_dof_names:
      weight: {
        type: double,
        default_value: 1.0,
        description: "map parameter without struct name",
        validation: {
          gt<>: [0.0],
        }
      }