Distance input to reach the distination with object avoidance + Can I use C lan
Mengz_Zai
Posts: 7
Hi.... everyone
I am stump by this project.
I would need to do a programming which allows the user to input 2 distances, the length and breadth then boe bot will find the shortest path to the finishing point.
I do not know even how to start on this problem.
Once completed this step, I need to do an object avoidance at a radius of , example, 4 cm and come back to the shortest path line ( if there is no other obstruction).
Please help me in the this and if there is any sample code similar to this for me to view, analyze and understand.
I really pulling my hair out soon...
Attached is are the 2 picture of my requirements.
Thank you!!!!
I am stump by this project.
I would need to do a programming which allows the user to input 2 distances, the length and breadth then boe bot will find the shortest path to the finishing point.
I do not know even how to start on this problem.
Once completed this step, I need to do an object avoidance at a radius of , example, 4 cm and come back to the shortest path line ( if there is no other obstruction).
Please help me in the this and if there is any sample code similar to this for me to view, analyze and understand.
I really pulling my hair out soon...
Attached is are the 2 picture of my requirements.
Thank you!!!!
Comments
As with any problem, you need to break it into pieces, understand and solve each piece separately, then combine the pieces.
There are examples and learning exercises for the object avoidance part. You can find them in the tutorial "Robotics with the BoeBot" which you can download from Parallax if you don't have it already. There's also a modification of the program "Roaming with the PING)))" which uses the PING ultrasonic sensor for object avoidance. This is downloadable from the PING))) product page in Parallax's webstore.
For the "shortest path" part, this is really a geometry problem. The Stamps have sine (SIN), hypotenuse (HYP), and arctangent (ATN) operators which can be used to compute an angle and distance given two sides of a right triangle. There's a detailed explanation of these in "BASIC Stamp Syntax and Reference Manual" and in the Stamp Editor's help files. You'll have to figure out how to turn the BoeBot to an approximate angle and how to get it to travel in a straight line. The "Robotics with the BoeBot" tutorial may give you some ideas.
If you have specific questions, feel free to ask.
This is like C with the addition of classes.
There is a manual with tutorial examples for the boebot using javelin
http://forums.parallax.com/showthread.php?p=829542
This is a reworked version of the Robotics with the Boebot text.
regards peter
Yes this is a class project, but I have been searching for similar project for code reference.
I do understand the geometry formula and also for the avoidance I know I have to check the individual radius base on different rpm on the individual servo motor.
My problem here is to input the length and breadth. Is it the only way to input the dimension is in the code itself?
Or is there a way or code when executing the code a screen will pop up (i.e java) asking for the length and breadth, which after it will calculate using the code and execute the movement....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Can I check If javelin stamp code can be use to create a java like pop up to input the Length and Breadth as stated above?
Will try out the debug program as you have mention and will upload the code when success!!!
Cheers!!
messages and input data to the javelin. It uses the programming cable.
Other option is to use a Uart object to communicate with standard
terminal programs like hyperterminal. This requires 2 I/O pins and
a TTL to RS232 converter chip like max232.
regards peter