For the last 4 weeks I've been working on my own navigation plugin, that uses
ping sensors for it's distance sensing and I ran in to a few problems... Mainly
that I'm not a very good programmer... Last time I made a program was in college
and that was still in visual studio 2006... and about 2 years ago... But I started with
full conviction and dedication that with the power of the internet everything is
possible. And so far I find it kind of addictive ...
The goal of this project is to make a plugin that makes my robot and other
robots semi autonomous in their navigation. The idea is to have a window with a
picture of a robot in the middle and where you click it will go to, both on the
screen and in reallife.
The robot will use atleast 5 ping sensors on the front, a Kangaroo for positioning
and a compass for determining the direction. Also I will use an arduino to read
out the ping sensors and possible others aswell. It reduces the amount of ports
required on the EZ-B by a lot.
Short term goals
Making all base functions work. By this I mean:
- Drive controls: steering, backward & forwards, position & speed control.
- Reading out sensors: ping sensors, compass.
- More pretty gui features.
Long term goals
- Static object avoidance.
- Applying a tangent bug algorithm for navigation or similar.
When it works Goals
- GPS for outdoors.
- Mapping(possibly a sharp IR sensor that scans).
So far I've been working on a config panel in which one can add all the required
data and test features on the robot. This is both for testing and for me to learn
how to make each feature so I can I apply that later on in the project.
Config General Settings:
Config Distance Sensor settings:
Config Drive control settings:
So what's working so far...
- It remembers stuff... So all variables are saved and loaded.
- It calculates positions based on set angles and set max range.
- It controls servo's.
My current issue:
I have not been able to get the UART working... It does nothing... I have no idea
what the problem is. I tried reverse engineering it from the EZ-SDK and the
Dynamixel plugin that DJ made without any luck.
I usually get a long way with a clear example, those got me so far my entire plugin.
I want to use the UART to control the kangaroo and the arduino.
For the kangaroo I need to:
- Initialize the baudrate at 9600.
- Initialize the motors by sending: "1, Start, 0x0d" and with a delay(250ms works)
"2, start, 0x0d".
- Set the motor speed by sending: "1, s-30, 0x0d" and with the same delay "2, s-30, 0x0d".
It's a work in progress, any help would be much appriciated, I will upload it once
I complete the long term goals.
Also a many thank you's out to DJ and CochranRobotics for their plugins without
I would have probably ran a ground way sooner
This is great
Are you using the UART on the ez-b or the PC?
I'm using it on the ez-b.
This seems really cool.... I hope you finish it and get it working...
Hey, this looks really cool. Good job.
On the uart, I am sorry but I don't do things this way. I don't use the uart from the EZ-B but do use an onboard computer with a USB-TTL device that communicates to the Kangaroo and the Arduino's that I have in my project. I have used the uart through EZ-Builder though.
Have you tried your commands through EZ-Builder SendSerial command to make sure that they are correct?
It works fine through EZ-Builder, before I started with this plugin I made a
movement script panel and had full control. So I know it works, so it's definitly
what I've tried so far with uart... With the EZ-script I know what code I need to set it
up, but in C# I don't have a clue...
I understand, unfortunately I don't have the space nor the weight capacity to carry
an onboard computer. I would love to put a lidar on top, it adds atleast 10 awesomeness points .
So after about 2 weeks of trying to make it work I had a special moment when I
realized what the problem was... The serial commands weren't being received as
what they were send. I felt quite stupid after finding the solution... 1 line of code
fixed everything... It was way simpler than I thought it was... But everything works
now. I now have full control over the Kangaroo through my plugin which is fantastic.
So... Of to the next problem.
Great news for Friday congrats!