
Dark Harvest
DJ hi, I am getting some weird map results in Better Navigator using the encoder counter skill. Using a Roomba via PC COM port and for Level #3 Group #2, I taped into Roomba encoders that go to an Arduino with Wheel Encoder UNO firmware. For Level #3 Group #1, I use a RPLidar. In the config of the Wheel Encoder Counter skill, I enable the push to NMS checkbox and leave all other settings default as they exactly match the Roomba. In The Better Navigator, I use External as pose hint source. What I am experiencing is that when I move forward or backward, the map creation seems ok, but as soon as I turn left or right, the map gets all messed up. The counts from the encoders are surprisingly good. My guess is that the BN is not processing encoder counts correctly with the left and right commands?
The firmware wont' know the wheel direction - so that's gonna be a challenge if you're trying to do it in the EZB firmware. The robot skill is where it needs to be. Either that - or the robot skill can send a command to the firmware that explains the current direction. Actually, i like that.
I think the robot skill and firmware should be modified to accept a command that defines the wheel directions. That way, the firmware knows to add or subtract the encoder value. Everytime the Movement Panel direction changes, it sends an update to the firmware. The firmware will then use that value to determine how to alter the encoder count.
What do you think?
Btw the wheel encoder robot skill firmware is here if you wanna see how it's working: https://github.com/synthiam/Robot-Skill-Wheel_Encoder_Counter
Thank you @Athena and DJ,
The count pulses from the roomba encoder are suprisingly acurate. Just forget that the encoder is from the roomba and assume its a regular pulse count encoder. Would the Movement Panel from roomba send the direction to NMS or The Better Navigator?
I also think its a good idea to send direction to the arduino.
It's great to hear that the encoder pulses are accurate! Given that, let's focus on how to integrate the direction information effectively.
Movement Panel and Direction Communication
Movement Panel to NMS/Better Navigator:
Sending Direction to Arduino:
Implementation Steps
Modify the Robot Skill:
Update Arduino Firmware:
Direction Command Protocol:
0x01
for forward,0x02
for backward, etc.).Testing:
Example Code Snippet
Here's a basic example of how you might implement the direction command handling in the Arduino firmware:
Conclusion
By implementing these changes, you can ensure that the encoder counts accurately reflect the robot's movement direction, improving the navigation system's performance. If you have any further questions or need additional assistance, feel free to ask!
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
Okay i modified the firmware and robot skill of the Wheel Encoder to add or subtract the values based on the Movement Panel direction. Check the updated v10 wheel encoder robot skill and the new firmware for it.
I was under the impression, based on your previous message, that you are using the roomba to send it's pose data to the NMS from an Arduino UNO with the wheel encoders. Based on this question, I'm not sure I fully understand now what you're doing now
.
The roomba has built-in encoders and the roomba Movement Panel can send it's pose data to the NMS without you needing an arduino or anything else. It does it on its own
If you're not using the roomba's built-in encoder value counter and using an arduino wheel encoder, then you'd have to continue on with what i posted above.
I would use #1 because it doesn't require any additional hardware. The Roomba Movement Panel (https://synthiam.com/Support/Skills/Movement-Panels/iRobot-Roomba-Movement-Panel?id=19164) manual explains more.
LOL DJ, what a mess. I apologise for my poor fraise construction as it is not my native language. I am indeed using the Roombas encoders hoked up to an Arduino. I read in some posts that the data coming from the Roomba directly would go back to "0" when reaching 65565 or so. Will test the new firm and skill. Thank you.
Haha okay - no prob. We're progressing
I don't recall about the roomba robot skill going back to 0 but that could be the case. I'm sure it's something that can be fixed. Have you experienced issues by trying it? My first recommendation would be not use the roomba robot skill and see if you like that.
However, if you want to test out the new code i created - let me know. It "should" work based on my conceptual plan but it isn't tested. I'm just sitting watching the waves roll in while it rains outside. So i figured i should write some code and get you rock'n.
Bad news DJ, now as soon as I go forward both encoder counts jump from 0 to 6547.
Ah and here is the thred I was talking about the roomba encoders.
Ah okay - sounds like my logic is reversed in the firmware. You can edit and swap the ++ and - for the encoder count increments to try it.
im not at home anymore so I can’t make the changes rn