Since you will have a Laptop with you, how about getting telemetry data from your car to analyze them? Like echo, steering acceleration/braking.
Ioannis
Since you will have a Laptop with you, how about getting telemetry data from your car to analyze them? Like echo, steering acceleration/braking.
Ioannis
The code is a very simple state machine. I shall post a flow diagram if I can figure out an appropriate CAD tool.
Can (should?) middle school kids be asked to deal with the uncertainties of the real world? I think this TOY level car demonstrates that ambiguity in an appealing and dramatic fashion.
The code consists of a set of hardware related constants which need not be changed.
11 Variable definitions and the following four car behavior constants.
frontdanger - 12 inches
stopreversing - 26 inches
frontfree - 72 inches
desiredtrack - 36 inches
A routine that triggers the SONARS and puts the code in a tight loop when the radio transmitter has been turned on.
Six IF statements. These are each state machines. They evaluate the SENSOR data and tell the wheels what to do. Their labels are:
CheckIfInDanger
TryLeftTurn
TooCloseToWall
TooFarFromWall
ReverseOutOfTrouble
Keepreversing
At one level all the students need to modify are the constants. At another level they can modify these six IF statements. An advanced student could add more states.
Ken
Last edited by Kenjones1935; - 17th December 2010 at 19:08.
I suspect a major resistance to getting my robocar into public education is insecurity and uncertainty on the part of the teachers. We are talking about 'how things work' in 2011. My 2004 General Motors automobile contains upwards of 20 PICs. Each tire air valve has a pressure sensor and enough of a computer to maintain a presence on the car's internal wireless network. How did I discover this? I could not make sense of the little tire pressure warning messages on the dash board. A previous owner had rotated the tires. How many public school teachers could explain that in a hands-on way?
Ever tried to explain to a thirteen year old how a microwave oven works?
My robocars are very hands-on and available. All the components are visible including the hook up wire. The little cars react dramatically to programming changes. How do I communicate that to adults schooled in Education, not Engineering or Computer Science.
Ken
Do not under estimate their ability, the kids that is.
One example.
http://www.picbasic.co.uk/forum/showthread.php?t=10200
When YOU take the attitude that something is going to be difficult for someone to learn, then as long as YOU are doing the teaching it will be hard for them to learn.
Children are much easier to teach new concepts to than adults are. Adults "think" they know how things work. Remember the trouble you had with BASIC? That was because your understanding was based on pre-conceived notions from what you learned in the past. Children will not have that problem.
Dave
Always wear safety glasses while programming.
However, the only way to reach the students in a public school is through the teachers and the administrators. My question is what is the best way to communicate to them. It is a marketing issue. A teach-the-teacher issue.
Ken
At high speed, I worry that without some sort of reference point, your car will get "lost". If you add a cheap line sensor, you could add something like a 4" black tape reference point to one of the walls or floor beside one of the 4 walls. How accurate are your sonar readings? Can it measure the room from each corner successfully? If not, then you may need to add a cheap wheel sensor to measure distance. Really both of these would be dirt cheap, but yet add a new dimension to your car finding itself, as well as sensing it's speed. (although you could use your sonar to get speed. It would not be accurate as you turn a corner though. It will think you are going backwards as it senses the wall getting further away)
I think it's scheduled to be released right after Pic Basic Pro for dummies.Has the "Robotics for Dummies" paper back been published?![]()
Last edited by ScaleRobotics; - 28th February 2011 at 18:21.
The WEB says that a standard hockey rink is 200' by 85' with curved corners on a 10' radius. Here in Fitchburg we have both indoor ice hockey rinks and outdoor street hockey rinks where the players use roller blade skates. The rinks are bounded by an approximately 4' high solid wooden wall.
The advantage here is speed is possible; 25mph +- for electric cars well over that for nitro powered gas engined cars.
I just found a WEB site extolling the 2D IR proximity sensor. Two potential problems - outdoors in bright sunlight and multiple cars. What do you think?
I did not read the specs for IR sensing. They are talking inches to a few feet. I need at least ten feet, probably more.
http://www.societyofrobots.com/senso...pirrange.shtml
Ken
Last edited by Kenjones1935; - 28th February 2011 at 21:20. Reason: IR too short range
Hey Ken, I am often caught taking things too literally, so this may just be another case of that. But from the data sheet for the sensor you are using, it says:
So me taking that literally, since you have two sensors, the best you could get following the data sheet, is every 100 ms. At 20 mph, that's 30 feet per second, or about 3 feet in 100 ms. But maybe 20 mph is a bit fast anyway.The SRF05 can be triggered as fast as every 50mS, or 20 times each second. You should wait 50ms before the next trigger, even if the SRF05 detects a close object and the echo pulse is shorter. This is to ensure the ultrasonic "beep" has faded away and will not cause a false echo on the next ranging.
At that rate, you would only be able to steer the servo's every 5 servo pulses, before you got new information from the sensors. But looking on the bright side, you would have time for 500,000 instructions to chew on the data you collected.
Last edited by ScaleRobotics; - 28th February 2011 at 17:45. Reason: actually every 5 servo pulses, you would get new data from sensors
Yes, that is what my SRF05 says too. Presently my code has been pinging at about 5 times per second for each SONAR. I can up that rate.
My thoughts have been that more sophisticated math might give my car better control. I am thinking about mapping - sort of. If the car knows what it is trying to do, where it is relative to the walls and how fast it is going, it may not need so many SONAR pings. I may be just dreaming. I know nothing about classical robot positional and navigational code.
Hmmmmm.... Suggestions anyone? Has the "Robotics for Dummies" paper back been published?
Ken
Last edited by Kenjones1935; - 28th February 2011 at 18:02. Reason: missed a phrase
Bookmarks