Skip to content

Robot Config Format

iamtesch edited this page Aug 23, 2023 · 1 revision

The proposed format for the robot configuration files is as follows. Current extension is .cfg.

Language: YAML Known Fields:

  • names: This is a list of strings, corresponding to the module names.
  • families: Either a single string or a list of strings, corresponding to the module families. If a list of strings, should have the same length as the 'names' list.
  • hrdf: A string that is a path to the hrdf file. Should be relative to the current working directory, not absolute. Unix-style "/" directory separators are used.
  • gains: Either a single string or a dictionary of named string pairs (see example file below). If a single string value, implementations should use this as the gain with the "default" key. If a dictionary of strings, the dictionary key is the stored key for lookup in the implementation. A key with "default" should be included in this dictionary.
  • waypoints: TBD
  • paths: TBD
  • plugins: a list of dictionaries, one per plugin. Plugins are added in the order they appear in the dictionary. Each should have a "name" string value (used for reference by the user when accessing plugins) and a "type" (one of a set of known values, used to instantiate the correct plugin). Each plugin, depending on the type, can also define either string, list of string, list of float, float, or boolean values for other dictionary values. TODO: check types. The implementation for loading the plugin is responsible for storing, but not necessarily validating these plugin dictionary entries.

Other fields can be added for user data, and simple string values can be stored by implementations. TBD: define allowed types.

Comments:

  • Use "#" at the beginning of the line.

Example File:

names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
families: "Arm"
hrdf: "hrdf/A-2085-06.hrdf"
#gains: "gains/A-2085-06.xml"
gains:
  default: "gains/A-2085-06.xml"
  worst: "gains/A-2085-06-bad.xml"
plugins:
  - name: 'gravityCompensation'
    type: GravityCompensation
  - name: 'dynamicCompensation'
    type: DynamicCompensation
  - name: 'impedanceController'
    type: ImpedanceController
    gainsInEndEffector: true
    # HOLD POSITION AND ROTATION - BUT ALLOW MOTION ALONG/AROUND Z-AXIS
    kp: [500, 500, 100, 0,  10, 0]  # (N/m) or (Nm/rad)
    kd: [ 10,  10,   1, 0, 0.1, 0]  # (N/(m/sec)) or (Nm/(rad/sec))
test: extra data
and this test: "fun fun fun"
MOAR: "dwhwerwer"
Clone this wiki locally