But linear speed is fine, so I suppose the reason is that we skip 49 out of 50 update steps (1000 / 20 = 50). For the odometry calculation this doesn't matter, as we use step_time as time delta, but the IMU is not scaled accordingly. Here I made a fast change implementing the change I propose: throttle only the tf and topics publishing, not the plugins updates. Can u give it a try (note that I set bigger real_time_update_rate to 1000)?
Joint::SetVelocity() must be called in each simulation update step, or otherwise Gazebo will either reset it to zero for the next time step, or simulated friction and other physical effects reduce the joint velocity until the next SetVelocity() command, because Gazebo assumes that no torque is applied.
This PR fixes a bug introduced in #61. It addresses the problem described by @cobot here:
following the approach proposed here.
Assumption:
Joint::SetVelocity()
must be called in each simulation update step, or otherwise Gazebo will either reset it to zero for the next time step, or simulated friction and other physical effects reduce the joint velocity until the nextSetVelocity()
command, because Gazebo assumes that no torque is applied.