Why Doesn’t My Robot Drive Straight?
If you program a robot to drive straight, you expect it to do just that. Here are some of the reasons that a typical LEGO robot might not drive straight and some suggestions about how to deal with it.
The Movement blocks make it simpler to program a driving base than using blue Motor blocks. A trade-off for this simplicity, however, is that the details of the motor synchronization (i.e. the proportional feedback mechanism) are hidden from the user.
Real robots don’t drive straightMany years ago, Fred Martin, a Computer Science professor at University of Massachusetts Lowell, wrote an insightful paper about this topic, provocatively titled Real Robots Don’t Drive Straight.
Martin’s paper raises important questions about engineering education and robotics competitions in particular. Through a focus on feedback control, he explores the role of robotics in education, and the pedagogical challenge to develop technologies and activities that highlight key ideas in the fields being taught.
In the paper, Martin argues that feedback is a central process not only in our lives but also in engineered systems. Feedback is pervasive, but often invisible.
“Autonomic body processes, like temperature regulation and breathing, happen without our conscious attention, and learned activities, like balancing and walking, are performed without deliberate attention.”
Martin concludes that “Over time, our ability to engineer feedback systems has also steadily improved, to the point where vehicles and processes that would normally be highly unstable (e.g., a fighter jet aircraft) can be made to ‘fly straight.’ But in practice, both biological and engineering systems do make constant corrections, be they minimal to the edge of perception. As educators, we must introduce students to this central principle, not hide it from them. Real robots don’t drive straight.”
Some of the reasons that robots don’t drive straightHere are some of the reasons that a typical LEGO robot might not drive straight and some suggestions about how to deal with it:
- Variations in motor performance. Try swapping or replacing the motors.
- Carpet pile direction. Try running the robot in the opposite direction, or at right angles.
- Center of balance / symmetry. Check for symmetry in terms of construction, weight, material, wheels, axis of rotation, and balance.
- Robot construction. Check that the wheels are well connected to the axis and frame, and that the beams and other bricks are firmly connected to each other.
- Caster wheel alignment or friction. Check the alignment of any caster wheels and that they spin freely.
- Problems with initial trajectory. When starting the robot, try putting a short wait time after pressing the button. Try reducing motor power and ramping up power to avoid jump starts.
- Motors have a small amount of internal gear slop (or backlash) between the encoders and the drive shaft that may affect initial trajectory. Gearing down the motors will reduce the impact of this problem.
- Wheels or gears catching or rubbing more on one side than the other. Check for bent axles and unseated tires.
- Dust/dirt causing a loss of traction. Clean the tires and perhaps sweep the floor.
- Is there more friction on one side than the other? Are any friction pins (black, black) being used for gears where frictionless (tan, gray) or axles should be used?
A better approach?If we accept that real robots don’t drive straight, then perhaps a better approach is to avoid giving our students challenges that rely on dead reckoning. Instead we should provide opportunities to use physical constraints and/or sensor information to localise and update the movement of their robots.
Whether a feedback approach is suitable obviously depends on how the challenge is framed, but might include one or more of the following strategies:
- Build a rail for a robot to move along.
- Use an ultrasonic sensor to drive along a wall.
- Use a light sensor to follow a line.
- Follow a bearing using a compass and/or GPS sensor.
- Use an IR beacon to determine a direction and infer a distance.
- Use the SPIKE Prime Hub’s built-in gyro sensor and a control loop to maintain orientation.
What do you think? Did we miss some of the reasons why real robots don't drive straight?
How do you introduce the concept of feedback and encourage your students to embrace it in their robots? Let us know in the comments below.
Great aproach. I always try to make them look different to things and imagine the possibilities and alternativas for a “problem”. Great list of suggestions. Thanks.