Skip to content

Commit f664193

Browse files
committed
fix: round joint positions to nearest integer
1 parent 0d31e32 commit f664193

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/control/reverse_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ bool ReverseInterface::writeFreedriveControlMessage(const FreedriveControlMessag
209209
// Add feature pose scaled to microns microradians to avoid precision loss in integer conversion
210210
for (double p : feature_pose)
211211
{
212-
val = htobe32(static_cast<int32_t>(p * MULT_JOINTSTATE));
212+
val = htobe32(static_cast<int32_t>(round(p * MULT_JOINTSTATE)));
213213
b_pos += append(b_pos, val);
214214
}
215215

0 commit comments

Comments
 (0)