Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   autonomous mode problem on field (http://www.chiefdelphi.com/forums/showthread.php?t=18878)

JasonStern 26-03-2003 10:56

Quote:

Human Player Phase: auton_mode = 1, comp_mode = 1
nope, in human player phase, comp_mode =1 and auton_mode = 0! The reason I know this for a fact is because our bot refused to move in auton period during pratice rounds. If auton =1, our bot would have went into auto mode during the human time and would have waited until it could move. Instead, it went into driver mode right away. We use multilple program slots, so the fix was to have the driver code check for autononymous mode and transfer control to its slot if it was on. However, it sounds like you are using one slot with if statements, so this isn't likely to be your problem

Dave Flowerday 26-03-2003 14:26

Quote:

Originally posted by Nate Smith
Pre Match: auton_mode = 0, comp_mode = 1
Human Player Phase: auton_mode = 1, comp_mode = 1
Autonomous Phase: auton_mode = 1, comp_mode = 0
Remote Control Phase: auton_mode = 0, comp_mode = 0
Post Match: auton_mode = 0, comp_mode = 1

These are probably the signals that the control system is sending to the OIs. However, the OIs themselves will not send down the autonomous bit to the RC unless BOTH autonomous is set AND it's not disabled.

Originally we had our switch wired up such that by flipping one switch, we grounded the auto pin and un-grounded the disabled pin at the exact same time. When we did it this way, there were 1 or 2 packets that went to the robot that enabled the robot but didn't have autonomous set. When we instead wired it up with two switches such that we could enable autonomous and then after that enable the robot, it would go straight from disabled with no auto to enabled with auto all at once.

My guess is that this is the same change that IFI made to the arena control system.

randomperson 26-03-2003 19:11

See.. these comp mode and other crap just confuse everyone... heres what we did:


if auto_button = 1 OR auton_mode = 1 then

select (auto_select)
case 0 to 2 'line tracking
run 6
'case 4 to 7 'dead reckoning
run 7
case 8 'joy 1
run 2
case 9 'joy 2
run 3
case 10 'joy 3
run 4
case 11 'joy 4
run 5
case 12 'joy 5
run 2
case 13 'joy 6
run 3
case 14 'joy 7
run 4
case 15 'joy 8
run 5
endselect

else
gosub operator_control
endif


When the autonomous program detects that auton_mode = 0 and someone has moved the joystick then it resets all its varibles and returns control to the first slot.. like so:

if auton_mode = 0 then

if p1_x > 142 OR p1_x < 112 OR p1_y > 142 OR p1_y < 112 then
run 1
endif
endif

This is why multiple slots are so much easier to program with... and by the way, have I mentioned yet that our autonomous mode has worked flawlessly in all of our competition matches?


All times are GMT -5. The time now is 07:42.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi