Skip to content

Commit

Permalink
fix encoder reference
Browse files Browse the repository at this point in the history
  • Loading branch information
yconst committed Aug 27, 2024
1 parent 26bd9fc commit 68bb4d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tm_joint_iface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ void TinymovrJoint::read(const ros::Time& time, const ros::Duration& period)
for (int i=0; i<servos.size(); i++)
{
const double ticks_to_rads = 1.0/rads_to_ticks[i];
joint_position_state[i] = servos[i].encoder.get_position_estimate() * ticks_to_rads;
joint_velocity_state[i] = servos[i].encoder.get_velocity_estimate() * ticks_to_rads;
joint_position_state[i] = servos[i].sensor.user_frame.get_position_estimate() * ticks_to_rads;
joint_velocity_state[i] = servos[i].sensor.user_frame.get_velocity_estimate() * ticks_to_rads;
joint_effort_state[i] = servos[i].controller.current.get_Iq_estimate();
}
}
Expand Down

0 comments on commit 68bb4d7

Please sign in to comment.