Notifications
Clear all

My robot drives like a drunk toddler

49 Posts
7 Users
2 Reactions
949 Views
byron
(@byron)
No Title
Joined: 7 years ago
Posts: 1232
 

Posted by: @tfmccarthy

Now the Elegoo motors don't have encoders but the car does have an MCU, and they use it to adjust the motor speeds for course correction. it works...to a degree

To navigate a bot, indoors or outdoors, some form of positioning system is really required.  For outdoor bots GPS to find the coordinates as to where the bot is and magnetometer sensors to show which way the bot is heading. work well.  For indoors there are boards using ultra wideband  such as the DW1000, Ultra-Wideband Transceiver, buts thats going overboard for an indoor play bot.  

Of course much depends on one's indoor environment etc, but I've found using a magnetometer in my environment does work but its not too accurate and repeatable.  I show a small snippet of some test reading I did using a MPU 9250.   I show the readings I got when the sensor was in a stationary position, and then after moving it about, returning to the exact same position a very short time later.   So probably useable for a wobbly trip around the room, not blind drunk, but definitely under the influence. 

MPU 9250 indoors


   
robotBuilder reacted
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 2 years ago
Posts: 514
 

mea culpa

In my post I incorrectly said "MCU" when I meant to say "MPU". The Elegoo SmartCar has a MPU6050 module and that is what is used to make the course corrections for the straight-line driving.

My apologies if this was misleading. Age and eyesight are to blame.

Posted by: @byron

To navigate a bot, indoors or outdoors, some form of positioning system is really required.  For outdoor bots ....  For indoors...

I agree a global coordinate system is necessary for accurate results. An independent, external system is best but isn't required. You can define your own global system; you pick your own origin. So the start position is the origin. You then track position from that point. I don't think this affects accuracy, just the precision (offset) from true position.

An interesting calibration algorithm I saw (can't recall the link) did something similar to your test. From a stationary steady state, it took readings (~2000) over short period (like 2 seconds) and then took the average as an offset from the true value. It used that offset to adjust future readings. My recollection is the outcome wasn't perfect but produced reasonable results. One test I thought might be interesting was to perform the calibration after moving the car and compare with the values from the initial calibration. Does the offset stay constant after movement? The precision of the readings is an issue here.

Posted by: @byron

So probably useable for a wobbly trip around the room, not blind drunk, but definitely under the influence. 

This is my conclusion about dead reconning as well. However, I'm hopeful that a beacon from a second sensor (i.e., camera) will improve things significantly.

I'm curious how the MPU 9250 compares to the MPU6050.


The one who has the most fun, wins!


   
ReplyQuote
byron
(@byron)
No Title
Joined: 7 years ago
Posts: 1232
 

Posted by: @tfmccarthy

My apologies if this was misleading. Age and eyesight are to blame.

For me its age, eyesight and hearing 😀.

Posted by: @tfmccarthy

This is my conclusion about dead reconning as well. However, I'm hopeful that a beacon from a second sensor (i.e., camera) will improve things significantly.

Yes, a camera should work splendidly.  Some years back I did briefly rig up an overhead camera looking down on a bot with a round blob in a room whilst it was empty in readiness for redecorating.  I used openCV to recognise the blob and calculate its 'screen' coordinates.  As I was mimicking GPS calculations I took the top the picture to be the north etc.  Anyway I remember writing something up on this in this very forum.  (unless I have to include memory loss in my aging foibles list 😉 ).  But I seem to have made too many posts on this forum to search through to find it, and its probably of no use for you anyway, but I'm interested to see if you progress your bot with augments to its navigation capabilities.

 



   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 7 years ago
Posts: 2508
 

@tfmccarthy 

Those cheap yellow Chinese motors do wobble a lot but I see them used successfully. The robot vacuum motorized wheels with encoders I use are much more solid and I get accurate encoder readings not sure why robot shops can't source them as well.

The Elegoo SmartCar has a MPU6050 module and that is what is used to make the course corrections for the straight-line driving.

Nuclear submarines have long used inertial navigation systems but even they eventually drift too much and need recalibrating with sonar detection of ocean floor features or signals from floating buoys.

I assume in the Elegoo SmartCar the details of reading and using the sensors is encapsulated in library code.

The Elegoo SmartCar camera could be used for orientation and feature based navigation although it would need you write your own code using wireless connection for PC assist. I see it has some basic stuff like following a line or color object.

@byron
Some years back I did briefly rig up an overhead camera looking down on a bot with a round blob in a room whilst it was empty in readiness for redecorating.

Better to have the blob on the ceiling and the camera on the robot base looking up. Lots of blobs throughout the house are cheaper than a camera in every ceiling. Some robot vacuums used upward looking cameras although now they seem to rely on feature extraction front looking cameras.

The visual systems of insects are examples of small powerful visual systems. One example is the digger wasps. A number of times I have followed the path taken by digger wasps carrying their prey (cicada or spider) back to the hole they have previously dug. Interesting they travel in straight lines walking over obstacles instead of around them and I believe they use large visual features like maybe trees. They can locate exactly on the hole even if you have covered it with pebbles.

 



   
ReplyQuote
Page 4 / 4