I'm confused about COUNTS_PER_REV #67
Replies: 3 comments 4 replies
-
You should run test_motors and verify the wheel rpm with a laser tachometer. Check the wiki. |
Beta Was this translation helpful? Give feedback.
-
The movement of the robot is fine in your video. You can run test_acc to find the max acceleration. Then adjust the velocity smoother parameters. |
Beta Was this translation helpful? Give feedback.
-
Your problem could be that you're using a single-channel encoder. I assume you've got something like a yellow TT motor with a speed-sensing encoder (disk with slots & opto-sensor). Linorobot is intended to be used with quadrature encoders. You need to get a yellow TT motor with quadrature hall-effect encoders (FITj0450 from DFRobot works). The problem with a discrepancy between measured RPM and RPM reported by test_motors could arise if you don't have interrupts enabled. You might be losing transitions. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I encountered an issue with COUNTS_PER_REV. According to the manufacturer’s specifications, the encoder output is 245 pulses per rotation, with a single-channel output. I set COUNTS_PER_REV to 245, but when I tested movement using teleop and Navigation2, the robot moved very slowly, and the motor sound seemed abnormal.
So, I tested the encoder using the calibration utility and got a value of approximately 1300. I then set COUNTS_PER_REV to 1300, and when I tested it with teleop, the robot moved normally. However, when testing with Navigation2 and commanding the robot to move to a goal, the issue still persisted as shown in the video clip. What should I adjust or fix? Thank you.
Motor and Encoder specifications.
COUNTS_PER_REV 245
2025-04-05.20-26-39.online-video-cutter.com.1.mp4
COUNTS_PER_REV 1300 ( calibration )
2025-04-05.21-11-18.online-video-cutter.com.mp4
Beta Was this translation helpful? Give feedback.
All reactions