Hi everyone,
I just completed the "Start Here" robot. I used a Sharp GP2D120 for the eyes and I used Fritsl's programming for the "Start Here" robot. I do not have any experience with programming but once I get this robot done then I will be able to learn more.
I have noticed that the robot is very slow, i.e.: It drives a little forward, then stops, and takes a reading, repeat. I assume this is because the robot is stopping to take a reading. If that is correct, then the SRF05 is better because it can take readings without having to stop the motors?
If that isn't correct I will have to re-write the program, which could be fun, but before I do I was wondering if the Sharp GP2D120 is even capable of continous readings?
Thanks,
-Jinn-
Neither sensor is cabable of
Neither sensor is cabable of “continous readings”. Both send out a pulse (IR or Ultrasonic) and look for an echo response. By timing when (or if) a response is received, both sensors can report range to a detected object.
You can adjust the programming so that the scanning behavior is different. I suspect your bot is detecting obstacles nearly constantly, which is why it is stopping and taking a reading to determine which way to go. What sort of obstacles do you have where your bot is driving? You may need to adjust the “safe” distances or move your bot to a more open area so that it doesn’t keep stopping.
Posting a video of your bot in action may help us see what is actually going on.
When I test the robot it is
When I test the robot it is on clear floor without any obstacles within three feet of it. If I put a cup in front of it, it will hit the cup.
I will have a video posted to my blog just as soon as it uploads to youtube, which could take forever, lol.
Thanks for your help,
-Jinn-
GP2D120 specs
Uhh, a GP2D120 spits out a reading every 39 ms or so, about 25 per second. I’d say that is pretty “continuous” or at least faster than the robot can probably react to.
The SRF05 has to be triggered to send out a ping, where the Sharp sensors just keep giving readings.
Might be good to throughly recheck code, as it could be that some little typo is causing a delay.
Thanks for the correction.
Thanks for the correction.
In any case, it sounds like a bug in the code to me as well.
Looking at the video on your
Looking at the video on your blog, I can see your bot seems to never feel safe to drive forward. Here are some troubleshooting suggestions.
- Use the “debug” command in your code and with the bot still hooked up to your computer, confirm what your readings are for range. Try placing objects at varying distances to the sensor, and see if the values the sensor is spitting out are making any sense.
- If that works OK, follow Gareth’s advice and break your code down into sections to test. Your little bot is getting confused about something. You just need to figure out where.
- Don’t give up! I ran into similar issues when I built my own Start Here Robot. I wound up re-coding using Fritsl’s code as a guide rather than a direct copy and eventually got the bot working OK.
You’re doing great. Keep it up!
Thanks for the help
Thanks for the help everyone!
I think i’m just going to “re-code using Fritsl’s code as a guide rather than a direct copy”. I figure that will force me to learn more instead of just learning how to fix a small problem.
Like Fritsl says, “Don’t program your robot… Teach it!”. In order to do that i’m going to have to use my robot to teach me first, which sounds fun!!
So I guess even though my robot isn’t fully functional yet, he deserves a robot page!
Make way for Codename Peek-E!!
-Jinn-