File tree 2 files changed +3
-3
lines changed
dynamixel_workbench_controllers
include/dynamixel_workbench_controllers
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ class TorqueControl
95
95
int16_t convertTorque2Value (float torque);
96
96
97
97
uint32_t convertRadian2Value (float radian);
98
- float convertValue2Radian (uint32_t value);
98
+ float convertValue2Radian (int32_t value);
99
99
100
100
bool gravityCompensation ();
101
101
Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ uint32_t TorqueControl::convertRadian2Value(float radian)
258
258
return value;
259
259
}
260
260
261
- float TorqueControl::convertValue2Radian (uint32_t value)
261
+ float TorqueControl::convertValue2Radian (int32_t value)
262
262
{
263
263
float radian = 0.0 ;
264
264
@@ -317,7 +317,7 @@ bool TorqueControl::gravityCompensation()
317
317
d_gain_ * ((error[PAN] - pre_error[PAN]) / 0.004 );
318
318
torque[TILT] = p_gain_ * error[TILT] +
319
319
d_gain_ * ((error[TILT] - pre_error[TILT]) / 0.004 ) +
320
- tilt_motor_mass * gravity * link_length * cos (convertValue2Radian (motorPos_->cur_pos .at (TILT)));
320
+ tilt_motor_mass * gravity * link_length * cos (convertValue2Radian (( int32_t ) motorPos_->cur_pos .at (TILT)));
321
321
322
322
setCurrent (convertTorque2Value (torque[PAN]), convertTorque2Value (torque[TILT]));
323
323
You can’t perform that action at this time.
0 commit comments