Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions roboclaw_node/nodes/roboclaw_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def update(self, enc_left, enc_right):
d_time = (current_time - self.last_enc_time).to_sec()
self.last_enc_time = current_time

# TODO find better what to determine going straight, this means slight deviation is accounted
if left_ticks == right_ticks:
if abs(left_ticks / right_ticks - 1) < 0.05:
d_theta = 0.0
self.cur_x += dist * cos(self.cur_theta)
self.cur_y += dist * sin(self.cur_theta)
Expand Down