|
iCub-main
|
This document (generated by AI)summarizes the default values used by embObjMotionControl when optional parameters are missing in configuration files.
Scope:
All tokens are defined as constexpr std::string_view in namespace yarp::dev::eomc::ParamValues inside embObjMotionControlDefaults.h.
| Human-readable name | Config value | C++ symbol |
|---|---|---|
| Low-level current | low_lev_current | ParamValues::controlLaw::current |
| Direct | direct | ParamValues::controlLaw::direct |
| Minimum jerk | minjerk | ParamValues::controlLaw::trajectory |
| Torque | torque | ParamValues::controlLaw::torque |
| Human-readable name | Config value | C++ symbol |
|---|---|---|
| Metric units | metric_units | ParamValues::fbkUnits::metric |
| Machine units | machine_units | ParamValues::fbkUnits::machine |
| Human-readable name | Config value | C++ symbol |
|---|---|---|
| Position metric | position_metric | ParamValues::outUnits::pos_metric |
| Velocity metric | velocity_metric | ParamValues::outUnits::vel_metric |
| Torque metric | torque_metric | ParamValues::outUnits::trq_metric |
| Current metric | current_metric | ParamValues::outUnits::cur_metric |
| Duty cycle (percent) | dutycycle_percent | ParamValues::outUnits::dutycycle |
| Machine units | machine_units | ParamValues::outUnits::machine |
| Human-readable name | Config value | C++ symbol |
|---|---|---|
| Not applicable | n_a | ParamValues::outputType::n_a |
| PWM | pwm | ParamValues::outputType::pwm |
| Velocity | velocity | ParamValues::outputType::velocity |
| Current | current | ParamValues::outputType::current |
| Velociy-current | vel_cur | ParamValues::outputType::vel_cur |
| Human-readable name | Config value | C++ symbol |
|---|---|---|
| None | NONE | ParamValues::temperatureSensor::none |
| PT100 sensor | PT100 | ParamValues::temperatureSensor::PT100 |
| PT1000 sensor | PT1000 | ParamValues::temperatureSensor::PT1000 |
| Human-readable name | Config value | C++ symbol |
|---|---|---|
| Prismatic joint | prismatic | ParamValues::axisType::prismatic |
| Revolute joint | revolute | ParamValues::axisType::revolute |
These are the keys used in the CONTROLS config group to associate each control mode with a named PID group.
| Human-readable name | Config key | C++ symbol |
|---|---|---|
| Position control | positionControl | ParamValues::controlMode::position |
| Velocity control | velocityControl | ParamValues::controlMode::velocity |
| Mixed control | mixedControl | ParamValues::controlMode::mixed |
| Torque control | torqueControl | ParamValues::controlMode::torque |
| Current PID | currentControl \ilinebr </td> <td class="markdownTableBodyNone"> ParamValues::controlMode::current \ilinebr </td> </tr> <tr class="markdownTableRowEven"> <td class="markdownTableBodyNone"> Position direct control \ilinebr </td> <td class="markdownTableBodyNone"> positionDirect \ilinebr </td> <td class="markdownTableBodyNone"> ParamValues::controlMode::positionDirect \ilinebr </td> </tr> <tr class="markdownTableRowOdd"> <td class="markdownTableBodyNone"> Velocity direct control \ilinebr </td> <td class="markdownTableBodyNone"> velocityDirect \ilinebr </td> <td class="markdownTableBodyNone"> ParamValues::controlMode::velocityDirect` |
Optional parameters and fallbacks:
| Parameter | Default value | C++ field |
|---|---|---|
| TemperatureSensorType | NONE | ParamValues::temperatureSensor::none |
| Verbose | 0 | defaults.focDefaults.verbose |
| AutoCalibration | 0 | defaults.focDefaults.autoCalibration |
| Kbemf | 0.0 | defaults.focDefaults.kbemf_foc |
Notes:
If TIMEOUTS is missing, these defaults are applied to all joints:
| Timeout parameter | Default (ms) | C++ field |
|---|---|---|
| velocity | 100 | defaults.timeoutsDefaults.velocity_ref |
| current | 100 | defaults.timeoutsDefaults.current_ref |
| pwm | 100 | defaults.timeoutsDefaults.pwm_ref |
| torque | 100 | defaults.timeoutsDefaults.torque_ref |
| torque_measure | 100 | defaults.timeoutsDefaults.torque_fbk |
If only one timeout entry is missing, only that entry falls back to default.
AMC FOC safeguard — effective minimums for AMC boards:
| Timeout parameter | Minimum (ms) | C++ field |
|---|---|---|
| velocity | 300 | defaults.timeoutsDefaults_amcFoc.velocity_ref |
| current | 300 | defaults.timeoutsDefaults_amcFoc.current_ref |
| pwm | 300 | defaults.timeoutsDefaults_amcFoc.pwm_ref |
| torque | 300 | defaults.timeoutsDefaults_amcFoc.torque_ref |
| torque_measure | 300 | defaults.timeoutsDefaults_amcFoc.torque_fbk |
Optional parameters and fallbacks:
| Parameter | Default | C++ field |
|---|---|---|
| hardwareTemperatureLimits | 0.0 | defaults.temperatureLimitsDefaults.hardware |
| warningTemperatureLimits | 0.0 | defaults.temperatureLimitsDefaults.warning |
Validation rule:
When torque control is enabled, these torque compensation terms are optional:
| Parameter | Default | C++ field |
|---|---|---|
| viscousPos | 0.0 | defaults.torquePidDefaults.viscousPos |
| viscousNeg | 0.0 | defaults.torquePidDefaults.viscousNeg |
| coulombPos | 0.0 | defaults.torquePidDefaults.coulombPos |
| coulombNeg | 0.0 | defaults.torquePidDefaults.coulombNeg |
| velocityThres | 0.0 | defaults.torquePidDefaults.velocityThres |
Mandatory (no fallback):
If CONTROLS.positionDirect or CONTROLS.velocityDirect is set to NONE, the corresponding PID is disabled.
Fallback behavior:
If the whole group is missing, Kalman filtering is disabled for all joints:
| Parameter | Default | C++ field |
|---|---|---|
| kalmanFilterEnabled | false | defaults.controlParametersDefaults.kalmanFilterParams.enabled |
| x0 | [0.0, 0.0, 0.0] | defaults.controlParametersDefaults.kalmanFilterParams.x0 |
| Q | [0.0, 0.0, 0.0] | defaults.controlParametersDefaults.kalmanFilterParams.Q |
| R | 0.0 | defaults.controlParametersDefaults.kalmanFilterParams.R |
| P0 | 0.0 | defaults.controlParametersDefaults.kalmanFilterParams.P0 |
If the group exists, all listed fields are expected.
If OTHER_CONTROL_PARAMETERS or deadZone is missing, deadzone is set by joint encoder type:
| Encoder type | Default value | C++ field |
|---|---|---|
| AEA | 0.0494 | defaults.controlParametersDefaults.deadzone.jointWithAEA |
| AEA3 | 0.0 | defaults.controlParametersDefaults.deadzone.jointWithAEA3 |
| AMO | 0.0055 | defaults.controlParametersDefaults.deadzone.jointWithAMO |
| AKSIM2 | 0.00068 | defaults.controlParametersDefaults.deadzone.jointWithAKSIM2 |
| Other | 0.00068 | defaults.controlParametersDefaults.deadzone.otherEncoder |
If the LUGRE group is missing:
| Parameter | Default | C++ field |
|---|---|---|
| Km | -1.0 | defaults.controlParametersDefaults.lugre.Km |
Other LuGre parameters are not assigned by this fallback path; the group must be fully present if used.
| Parameter | Default | C++ field | Notes |
|---|---|---|---|
| jointPosLimitsDelta | 2.0 ° | defaults.jointPosLimitsDelta | Position limits are reduced by this margin in limit reporting logic. |
| maxPositionMoveInterval | 0.080 s | defaults.maxPositionMoveInterval | positionMove commands arriving faster trigger a performance warning. |
These constraints are enforced by the parser at startup. Violating any of them causes a fatal error and prevents the device from opening.
All joints that belong to the same joint set must reference the same PID group name for each control mode. This is required because the firmware applies a single set of PID parameters per joint set, not per individual joint.
| Checked in | Constraint |
|---|---|
| All control modes | Joints in the same set must share the same CONTROLS.<mode> group name |
The embedded firmware uses one PID block for position, velocity and mixed control simultaneously. Therefore:
| Constraint | Error if violated |
|---|---|
| velocityControl name == positionControl name (or NONE) | velocityControl must equal positionControl or be NONE for each joint |
| mixedControl name == positionControl name (or NONE) | mixedControl must equal positionControl or be NONE for each joint |
Each PID group must declare the correct controlLaw token or parsing fails.
| PID type | Required controlLaw | ParamValues symbol |
|---|---|---|
| Current PID | low_lev_current | ParamValues::controlLaw::current |
| Position control | minjerk | ParamValues::controlLaw::trajectory |
| Velocity control | minjerk | ParamValues::controlLaw::trajectory |
| Mixed control | minjerk | ParamValues::controlLaw::trajectory |
| Position direct | direct | ParamValues::controlLaw::direct |
| Velocity direct | direct | ParamValues::controlLaw::direct |
| Torque control | torque | ParamValues::controlLaw::torque |
| PID type | Mandatory? | Notes |
|---|---|---|
| Position control | Yes — at least one joint must be active | Parsing fails if all joints have positionControl=NONE |
| Current PID | Conditional (lowLevPidisMandatory) | Depends on board/service type; at least one joint active |
| Velocity control | No | Warning logged if all disabled |
| Mixed control | No | Informational log if all disabled |
| Position direct | No | Treated as all-zero PID if absent |
| Velocity direct | No | Treated as all-zero PID if absent |
| Torque control | No | Silently disabled if absent |
| Constraint | Check location |
|---|---|
| RotorIndexOffset must be in [0, 359] | parseFocGroup |
| If HasRotorEncoderIndex == 0, then RotorIndexOffset must be 0 | parseFocGroup |
| HasTempSensor is deprecated — using it is a fatal error | parseFocGroup |
| Parameter | Constraint | Error if violated |
|---|---|---|
| Gearbox_M2J | Must not be 0 for any joint | Division by zero risk in transmission math |
| Gearbox_E2J | Must not be 0 for any joint | Division by zero risk in transmission math |
| motorPwmLimit | Must be ≥ 0 | Negative PWM limit is physically meaningless |
| fullscalePWM | Must be > 0 | Used as divisor in duty-cycle conversion |
| ampsToSensor | Must be > 0 | Used as divisor in current conversion |
| Constraint | Config parameters involved |
|---|---|
| jntPosMax ≤ hardwareJntPosMax for every joint | LIMITS.jntPosMax, hardwareJntPosMax |
| jntPosMin ≥ hardwareJntPosMin for every joint | LIMITS.jntPosMin, hardwareJntPosMin |
| Constraint | Threshold |
|---|---|
| warningTemperatureLimits < 85 % of hardwareTemperatureLimits | 0.85 × |
Currently the hot-swap of output type of velocity direct (pwm into current and viceversa) is't unsupported s
| Constraint | Notes |
|---|---|
| Every AxisMap index must be < total number of joints | Out-of-range indices cause a fatal error |
| AxisType must be revolute or prismatic | Unknown values cause a fatal error |
Currently this vales aren't used by Embedded Motion Control