PickNikRobotics / generate_parameter_library

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

markdown/rst: Support __map_ and nested parameters #164

Closed christophfroehlich closed 8 months ago

christophfroehlich commented 8 months ago

This closes #118 and closes #126.

I had to write a custom jinja2 filter valid_string_cpp to create valid c++ string literals for multi-line descriptions.

This also adds rudimentary support for the default config:

joint_trajectory_controller:
  ros__parameters:
    action_monitor_rate: 20.0
    allow_integration_in_goal_trajectories: false
    allow_nonzero_velocity_at_trajectory_end: false
    allow_partial_joints_goal: false
    cmd_timeout: 0.0
    command_interfaces: '{}'
    command_joints: '{}'
    constraints:
      <joints>:
        goal: 0.0
        trajectory: 0.0
      goal_time: 0.0
      stopped_velocity_tolerance: 0.01
    gains:
      <joints>:
        angle_wraparound: false
        d: 0.0
        ff_velocity_scale: 0.0
        i: 0.0
        i_clamp: 0.0
        p: 0.0
    interpolation_method: splines
    joints: '{}'
    open_loop_control: false
    state_interfaces: '{}'

Would there be any possibility to add a description to a top-level of the nested structure? I didn't manage to write correct yaml syntax for that. Maybe this would have to be solved with a new type "struct", just for documentation purposes? Example is the description of "constraints" here: image