Finally the Mcmaster University SUMO Robot competition ended, my robot got the third place. It is fun and an excellent experience.
Update 23/ 1/ 2014
now i have a new problem, when i plug in the usb to arduino UNO, the program is working as i expect, however, when i plug in the battery to ardunio instead of usb, my robot is not acting as it should. would anyone plz tell me why is this happening?
I'm a second year mechatronic student and im going to make a mini sumo robot for competition. i started with doing some research and modeling on inventor. At the beginning i decided to use ultrasonic sensor for detecting opponent and its working well, however it can't fit between front and rear wheel. so i come to SHARP IR sensor. now the problem is that i dont know how to progrm my robot to make it follow ant object appear in front of it. The video i linked is exactly what i want to achieve. Would anyone plz help me give me any hit or show me a sample arduino code?
Read left sensor Read right sensor If left reading closer, turn right until readings are equal If right reading closer, turn left until readings are equal Go forward Repeat
What you want for your robot is a PD controller (you can google up how it works and get sourcecode), if one of the sensors finds something, the robot should move towards it, according to the analog input difference from the sensors.
I’d like to give you some advice:
- Sharp analog sensors are slow - their measurement time is around 40ms, as I can see (Judging by the motors chosen) you’ll want to build a fast robot, to fight fast opponents. during 40ms your opponent can go right in front of you, from one side to another, and you won’t even notice him.
- Don’t place sensors on moving platform(like in the front)
- You don’t need to have moving ramps, If you make your ramp very sharp and close to the ground, other robots will just ride on it, and lose contact with the ground - no need to flip them. Adding moving parts makes the robot less solid, and more wobbly
Also 1 question: where did you get the wheels and tires for the motors? Can you provide a link?
You should add some sort of tolerance between the comparison of distances, otherwise if the target object isn’t completely uniform your distances will never match and your bot will keep trying to steer left and right until it gets two exactly matching distances.
I’M still a Newbie,…I would like to know how you program to balance both readings of IR left and IR right…
These would be my attemp…
leftdist = 0
rightdist= 0
If ( leftdist < rightdist )
turn right
about the delay of turning the body of a bot… I also dont know how.cause we cant put a specific delayed time if the bot was depending of the equality of readings in both sensors
.and i would like to attemp again
Delay ( leftdist = rightdist )
then go forward
Would that work on programming it??
Heheheheh…sorry sir… Newbie Here…!!!
The purpose of asking this is I would like to know a lot of things or gather informations first before a could contruct my own bot…
Sounds like a power issue It sounds like there is not enough power for the arduino, motors and sensors. This is a common problem. What is your battery power source?
I use a finite state machine to control the behavior, and you can see the specific behavior you’re looking for in the function handlePushingObstacle, which is in SumoFSM.c inside that zip file.
Basically, if it sees the opponent in both sensors, it goes full speed ahead. If it sees it only with the left sensor, it slows down the left wheel a bit so it will pivot in that direction, and vice versa for the right side.
Let me know if that isn’t clear, or doesn’t help you.