
budel0
Hey everyone,
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 eek ...
The Goal 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).
Current state 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.
Some images: Mainform
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 ARC though.
Have you tried your commands through ARC SendSerial command to make sure that they are correct?
@CochranRobotics It works fine through ARC, 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!
I have been making some great progress with the plugin:
Acceleration/decceleration has been applied to the kangroo test controls. So the robot will accelerate/deccelerate with the specified acceleration up to the specified speed.
The test controls show realtime drive speed from the kangaroo.
Communication with the arduino has been established. The distance panel will show the actual distance measured by the arduino received by the EZ-B and it will be displayed in the graph.
Today I also received my compass, well its a 10 DOF IMU from Adafruit. I though it would be fancy to have some extra features like pitch & roll angle, altitude and temperture.
Using some quick coppy&pasting action from the examples combined with my own arduino sketch and I can now access all data from the IMU aswell. I expected to have more problems but it works. I only need to add this to the plugin. I'm imagining cockpit like gui for the compass tab in the config
I'd say great progess, especially if I think about 4 weeks ago when I was still scratching, my head over variables and forms
.
Once I complete the gui for the compass and other sensors I should be able to
start with the actual navigation