Skip to content

Commit

Permalink
remove velocity_ff and torque_ff from set_position command
Browse files Browse the repository at this point in the history
  • Loading branch information
elchanka committed Nov 21, 2024
1 parent da0c0dd commit 4c25849
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/protodevice/src/device/ODriveCan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ if (!x.containsKey("position") || !x.containsKey("velocity") || !x.containsKey("
return;
}
float input_pos = x["position"].as<float>(); // Desired position in revolutions
int16_t vel_ff = x["velocity"].as<int16_t>(); // Velocity feedforward
int16_t torque_ff = x["torque"].as<int16_t>(); // Torque feedforward
int16_t vel_ff = 1000; // Velocity feedforward
int16_t torque_ff = 1000; // Torque feedforward
ESP_LOGD("canbus", "Parsed JSON: Position=%.2f, Velocity=%d, Torque=%d", input_pos, vel_ff, torque_ff);
Expand Down Expand Up @@ -539,8 +539,6 @@ id(${this.name}_errors).publish_state(error_string.c_str());
type: 'json-schema',
schema: {
position: { type: 'float', description: 'Position in revolutions' },
velocity: { type: 'int', description: 'Velocity feedforward' },
torque: { type: 'int', description: 'Torque feedforward' },
},
},
},
Expand Down

0 comments on commit 4c25849

Please sign in to comment.