|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
approach to autonomy
I'm fairly familiar with C++ and the basics of programming the robot's basic functions: mapping joystick commands to relays/speed controllers, and how sensors work, but this autonomy thing is a little above my knowledge. The approach I would like to use is to have the robot roughly follow the path of the white line, but just by programming how long each motor should be powered for, rather than losing sleep over the optical sensors. The way I am hypothesizing doing this, since I'm sure I wont be able to test it for a few weeks is as follows:
The first thing I would like to do would be move forward: 1) declare a variable, I'll call it motor_on_fwd (do i need to identify it in the initialization constants section too?) 2) Create an autonomy section in the Perform Operations section (along the lines of the one presented on page 18 of IF's Programming Reference Guide) 3) This is where I get a little confused, if i was doing this in C++, I'd write it as an accumulating loop while motor_on =! # (# equaling the amount of time i want to move divided by 26 ms)<--which i read is the amt of time for 1 cycle { p1_y=255 p2_y=255 motor_on + 1 } I'm not sure how exactly the while loop works in pbasic or what it is called, so I'm going to need some help there. If I'm just completely barking up the wrong tree here, please let me know. Also, is there any way I could try this method out on our robot from last year in the meantime, or did that control system not have this function ? Thanks in advance for any advice, Mike |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What Should Be Done With Autonomous? | xavior06 | FRC Game Design | 91 | 28-04-2005 19:00 |
| How do you approach your animation? | Koko Ed | 3D Animation and Competition | 7 | 27-01-2003 21:42 |
| Autonomous Period | Andy Grady | General Forum | 73 | 20-01-2003 21:34 |
| EduRobot autonomy | dlavery | Robotics Education and Curriculum | 3 | 02-12-2002 10:08 |
| Proactive approach to scoring dilemmas | reisser | 3D Animation and Competition | 0 | 02-07-2002 21:54 |