|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
robot goes haywire with the one joystick default code
Greetings,
downloaded the single joystick control program from first robotics site. Was able to download it to the robotic without any problem. Now the question: When we turn on the robot, it goes a bit crazy. It will respond to the single joystick control movemets, but once you release the joystick and it centers, the robot still spins around. Have tried adjusting the wheels on the joystick, but still doesn't behave properly. Is this a known problem ? Ideas on how to have no movement when the joystick is in the center position? Also ideas on tuning down the sensitivity to joystick inputs. thanks in advance. |
|
#2
|
|||||
|
|||||
|
Hmmm ... what I would do is keep the robot tethered up, and debug some values. Assuming you call your motor outputs driveL and driveR, put something like this in the bottom of your code:
Code:
debug ? p1_x debug ? p1_y debug ? driveR debug ? driveL debug "Filler Text" debug cls (in that case, check the wiring to make sure it's all correct, and the pwm cables go to the right number that the serout command expects).Sorry I can't be of more help, but I haven't had this problem before, so I don't know what to say. Stephen PS. Kind of obvious, but just in case: when you do this testing, make sure you set your robot up on some blocks so the wheels can move freely without contacting the ground. |
|
#3
|
|||||
|
|||||
|
That sounds like either the centre points are messed up in the program itself, or your joystick is not centred physically.
If neither of those are true, maybe there is something actually wrong with the joystick? Try swapping it with the other one maybe? Also, are you sure you have all the motors/victors wierd properly to the robot controller? |
|
#4
|
||||
|
||||
|
I had this exact prob on the Edu-Robot. I have yet to test out the Full size sys.
|
|
#5
|
||||
|
||||
|
make sure the PWM outputs are correct. i did this, and well, when the robot flipped out and almost broke a few legs, i went through and realized all the stuff i forgot to change
. |
|
#6
|
||||
|
||||
|
Use the dial on the joysticks to adjust the calibration. Make sure your PWM's are correct. You might want to put the robot up on blocks before you do this.
|
|
#7
|
|||||
|
|||||
|
Maybe this is not a programming issue at all and you just have a low battery. When the battery is low, the controller doesn't get enough energy and weird things start happening.
|
|
#8
|
|||||
|
|||||
|
To help with the joystick sensitivity, you could add some code to create a "dead-zone".
Essentially, the robot would think the joystick is in the neutral position unless it is moved in a direction a certain amount. Code:
'---------- Joystick Dead Zone ------------------------------------------------------------------------------- '------------------------------------------------------------------------------------------------------------- if ((p1_y > 137) OR (p1_y < 117)) then end_p1_y_dead_zone_adj p1_y = 127 end_p1_y_dead_zone_adj: if ((p1_x > 137) OR (p1_x < 117)) then end_p1_x_dead_zone_adj p1_x = 127 end_p1_x_dead_zone_adj: |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How much planning goes into your robot? | Jnadke | General Forum | 41 | 29-01-2006 21:29 |
| Default Robot Code | lvhsrobotics | Programming | 2 | 10-01-2003 16:55 |
| WASH Palm scouting at the Championship | Mike Soukup | Scouting | 2 | 19-04-2002 15:14 |
| Rookie Programmer has question about the default code | DanL | Programming | 3 | 26-01-2002 19:59 |
| about how Drive Train push the robot... shouldn't the force accelerate the robot? | Ken Leung | Technical Discussion | 12 | 26-11-2001 09:39 |