Results 1 to 5 of 5

Thread: Warning about Joystick Initialization

  1. #1
    Join Date
    Jan 2006
    Posts
    11

    Default Warning about Joystick Initialization

    I'm surprised I haven't seen this mentioned yet, but perhaps no one's as perversely curious as I am. After noticing that the kit joysticks have no trim tabs, I discovered that the Driver's Station centers the joysticks at some point during boot up. So if you're leaning on the joystick during bootup, your robot is likely to run away when you release the joysticks, as your center has moved.

    I imagine there's nothing to be done about this, since the joystick axes (I believe) are encoders, and thus have no absolute zero. Still, I think there should be a warning or caveat in the documentation somewhere, since I haven't seen this documented anywhere.

  2. #2
    tvrobotics Guest

    Default Re: Warning about Joystick Initialization

    Thanks. That's good to know.

    I Will remember to watch out for that.

  3. #3
    Join Date
    Jan 2007
    Posts
    0

    Default Re: Warning about Joystick Initialization

    Not all encoders are relative. There are absolute encoders.

    Unfortunately, the kit joystick does NOT have absolute sensing for its X and Y axes (it does appear to have an absolute sensor for its Z-axis scroll wheel, though).

    There is an even more insidious initialization issue that I discovered while confirming Kevin's statement. I believe that the joystick only sends data upon change-of-state (depending on the USB Host's driver). You'll notice some very unusual initialization behavior if you use, for example, LabVIEW on a PC to sample the joystick. The Driver Station's joystick drivers may act a bit differently. My PC's drivers tend to "remember" the last known value and will instantaneously go to zero after I twitch the joystick.

    I would STRONGLY encourage teams to ensure that their joysticks are centered at power-up AND they should get in the habit of giving their joysticks a jiggle before enabling the robot in order to force the USB Host drivers to obtain new position readings.

    Russ

  4. #4
    Join Date
    Jan 2006
    Posts
    11

    Default Re: Warning about Joystick Initialization

    Russ,

    Your second issue was mentioned by Joe Ross in a post about Driver Station limitations. Given your description of the problem, this is probably of a piece with the joystick driver maintaining the last value when the joystick is unplugged. If the drivers aren't updating until they get a packet from the joysticks, then that'd explain both problems.

    According to Joe, issue of stale values on unplug is being worked on. Presumably a fix for that would address the issue of stale values on initialization as well, but we'll have to wait and see. As I noted, however, I don't think there's any avoiding my stated issue with the kit joysticks. Other joysticks may use pots or absolute encoders, and would not have this problem. I presume you can recognize them by the presence of trim tabs, as trim tabs only make sense if you have an absolute reference for center that needs adjusting.

  5. #5
    StumpJumper Guest

    Default Re: Warning about Joystick Initialization

    Hey, Kevin - Thanks for this post. I am sure no matter how much we say to our drivers that someone will be fiddling with the joystick upon power up. This make the enable/disable switch even more important.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •