Compatible with firmware that counts wheel rotation for left and right wheels with wheel encoder.
How to add the Wheel Encoder Counter robot skill
- Load the most recent release of ARC (Get ARC).
- Press the Project tab from the top menu bar in ARC.
- Press Add Robot Skill from the button ribbon bar in ARC.
- Choose the Navigation category tab.
- Press the Wheel Encoder Counter icon to add the robot skill to your project.
Don't have a robot yet?
Follow the Getting Started Guide to build a robot and use the Wheel Encoder Counter robot skill.
How to use the Wheel Encoder Counter robot skillThis skill is compatible with Arduino UNO firmware that counts wheel rotation for left and right wheels.
This robot skill requires supporting capability on the EZB with firmware. The firmware is open-source so that you can modify it for different Arduino's and microcontrollers. The Wheel Encoder Arduino UNO firmware can be found here: https://synthiam.com/Docs/Hardware/Arduino-Genuino-Uno
1. Get Wheel Values Button
Manually requests the encoder values for each wheel. Please do not use it when pushing to NMS because this is done automatically with an interval timer.
2. Reset Values Button
Resets the encoder values back to zero. Please do not use it when pushing to NMS because it will break the current pose.
3. Get Wheel Values & Reset Button
Resets the encoder values back to zero then starts acquiring the encoder values again. Please do not use it when pushing to NMS because this will break the pose.
4. Status Display
When the debug checkbox is checked, this will display a text readout of the encoder values.
Settings - General
1) Poll Interval
How often to poll the wheel encoder values from the Arduino.
2) Display debug information
This will display the wheel encoder values to the log file for debugging in real-time.
Settings - NMS
1) Push to NMS
Enabling this checkbox will push the data to the NMS as a Level 3 Group 2 sensor. This updates the pose telemetry of the robot's positioning.
2) Encoder ticks per wheel revolution
How many encoder ticks for one revolution of the wheel. This is used for the NMS pose calculation.
3) Wheel diameter (mm)
The diameter of the wheel is in millimeters. This is used for the NMS pose calculation.
4) Pivot diameter (mm)
The distance between centers of wheel treads. This is used for the NMS pose calculation.
The Navigation Messaging System (NMS) is built into the ARC framework. It allows skills to push data (location & obstacle detection) into the messaging system. Then, mapping/navigation SLAM skills can subscribe to the navigation events. The NMS was designed to provide transparent Navigation to the user in ARC. You do not have to write any complicated code because the robot skills will work for navigation and obstacle avoidance.
How to Use Wheel Encoder Counter
1) Download the Arduino firmware onto a UNO (or edit for your Arduino version). The Wheel Encoder Arduino UNO firmware can be found here: https://synthiam.com/Docs/Hardware/Arduino-Genuino-Uno
2) Connect your wheel encoders to port D2 (left wheel) and D3 (right wheel) on the UNO.
3) Add the Wheel Encoder Counter Skill (Project -> Add Skill -> Navigation -> Wheel Encoder Counter). Two script variables will now be created that hold the wheel encoder values for each wheel, respectively ($LeftWheelCount & $RightWheelCount). Or, you can enable the NMS checkbox in the configuration settings to push the pose to NMS as a Level 3 Group 1 sensor.
4) Connect the UNO to ARC.
The Wheel Encoder Arduino UNO firmware can be found here: synthiam.com/Docs/Hardware/Arduino-Genuino-Uno
There are ControlCommand() to reset the $LeftWheelCount & $RightWheelCount values, or force get the values on demand rather than automatic on a timer. Do not reset or manually poll the wheel count using the NMS because it will affect the current pose data.
You can see how this skill was created by watching the live hack event here: synthiam.com/HackEvent/Dj-s-5th-Live-Hack-Session-17578
Related Hack Events
Dj's 5Th Live Hack Session
In this 5th live robot hacking event, I will demonstrate how to program an Arduino and connect it to EZ-Builder via USB...
Arduino EZB Firmware To ARC Communication
I am trying to make a plugin. How can I send a non int number from arduino firmware to ARC plugin? For example, if I...
What Is Really Needed For Indoor Navigation?
I have read about many ways to develop Indoor Navigation. The Hardware recommended varies from an IPS system to a Lidar...