Author Topic: User Interface  (Read 1659 times)

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
User Interface
« on: January 11, 2018, 12:07:23 PM »
The top-most post in this thread will be updated to provide the most recent user-interface definition.


(0) Joystick drivetrain controls (excluding buttons, see below)

Left joystick - Up/Down (Y axis) maps to the robot's motion fore and aft.
Left joystick - Left/Right (X axis) maps to the robot's side-to-side (also called strafing) motion.
Right joystick - Left/Right (X axis) maps to the robot rotating left and right.

(1) The Game Controller Contains the normal operation controls.

Move Arm to Ground Height - Game Controller Right trigger
Auto function. Move arm to the specified height (as of RIDE)
This is intended to set the stage to grab a Cube from the ground. Lowering the arm to this height while holding a Cube is not recommended because the orientation of the Cube in the Pincher may not allow the arm to be lowered all the way to the ground and can lead to Pincher and/or Cube damage.
Move Arm down, activate Intake and ingest a Cube. Tucks it safely away (however that is defined)

(unused as of RIDE) Fix Stuck Cube - Game Controller Left Trigger
This button will alter the speed of one Intake wheel when (1) the button is pressed and for (2) the duration that Get the Cube command is active. Its purpose is to handle the case when a Cube is at near 45 degrees to the Intake and the mechanism is unable to ingest the Cube due to the symmetry. By changing one of the wheel's speed, this will unbalance the Intake and rotate the Cube making it easier to ingest. The wheel whose speed is changed toggle with each use.

Open Pincher (Release  Cube) - Game Controller Left Bumper
Release the Cube by opening the Pincher (as of RIDE)
Opens the Gripper and let go of the Cube. If there is no Cube, does nothing. Does not move the arm before or after the command. User must use one of the Move Arm buttons to stow away the Arm.

Close Pincher (Grab Cube) - Game Controller Right Bumper
Release the Cube by closing the Pincher (as of RIDE)
Auto Function: Closes the Gripper. User is responsible for moving the Arm to the correct location.

Move Arm to Exchange height - Game Controller A Button.
Auto function. Move the arm to the specified height, with or without a Cube.
[Note: The only real use for this function is to drop the Cube in front of the Exchange before pushing it in with the robot. It has no other real use. In this use, remember to get the Pincher out of the way before pushing!]
(this was formerly button X)

Move Arm to Lower Scale height - Game Controller B Button.

Auto function. Move the arm to the specified height, with or without a Cube.

Move Arm to Upper Scale height - Game Controller Y Button

Auto function. Move the arm to the specified height, with or without a Cube.

Move Arm to Switch height - Game Controller X Button.
Auto function. Raise Intake and release Cube. Driver pushes Cube from here on.
(this was formerly button A)

(After RIDE) Climb Up - Game Controller Right Stick.
Activates the climbing motor. The climber hardware has a ratchet so there is only an "up" movement.

Fine Tune Arm Up/Down - Game Controller Left Stick
Arm moves only when stick is engaged. Speed is fractional but proportional to stick movement. A deadzone is used.
The initial fractional speed is 1/4.
The initial deadzone is +/- 0.5. This is a significant zone that covers 1/2 of the joystick range (to avoid accidental touches of the stick).

(unused) - Game Controller D-pad

Cancel Auto Function - Game Controller Back Button
Auto Function: Cancel any currently running Auto Function.
Arm and Intake move to safe/reset/home position.

(After RIDE) - Move Arm to Climb Position - Game Controller Start Button
Auto function. Move the arm to the specified height, with or without a Cube. The arm must previously have been at the Upper Scale position.

(2) The buttons on the joysticks contain the special functions. These are manual overrides or commands used to bail us out of a tight spot.

(unused as of RIDE) Toggle Intake - Right Joystick Button 6

Auto Function: Intake movement should be totally automatic based on the function selected so we should never have to use these controls. In the event we want to manually move the Intake, this button will toggle the position of the Intake up and down.

(unused as of RIDE) Intake Flush - Right Joystick Button 7
The original use for Flush was to propel the Cube through the Exchange. But this is a bad idea because the Intake should be Up at the Exchange to avoid potential damage. So Flush is here just in case we need it. Motor operates as long as the button is pressed.

(unused as of RIDE) Ditch Cube - Right Joystick Button 8
Auto Function: If we have a Cube, get rid of it. Raise the Intake. Drop the Cube safely to the ground from wherever it's held. One possible use would be if we have a Cube but need to rush over to Climb and just want to drop our load.

Toggle Gyro Use - Right Joystick Button 9
The DriveTrain defaults to FieldCentric. This button toggles the FieldCentric on and off. Only do this if the Gyro is having problems. Otherwise there's never a good reason to operate in robot-centric mode.

(unused as of RIDE) Intake Cube - Left Joystick Button 9
This turns on the Intake motors to suck in a Cube.

(unused as of RIDE) Move Claw To Level - Left Joystick Button 10
Makes the claw level. This happens by default (as the default command).

(unused as of RIDE) Toggle Intake Grip - Left Joystick Button 11
This opens and closes Gripper to release and grab a Cube respectively
« Last Edit: October 17, 2018, 01:02:57 PM by Louis L »

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #1 on: January 17, 2018, 01:46:53 PM »
Added basic robot movement using the joysticks.

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #2 on: January 17, 2018, 02:06:26 PM »
In order to get moving on the software beyond just the drive train, we need to start thinking about how this robot will get the job done and what the various controls will be. Below are some thoughts for controls. This is meant to be just a starting point for discussion. Let's figure this out and get a first pass by this weekend. Nothing is finalized until the last minute since the software has to reflect our game play and that can change as we build the robot, test it and refine our ideas.

  • Acquire Cube button press - Game Controller Right Trigger - to go grab a Power Cube from the ground. This will lower the arm, engage the intake and wait for the Cube acquisition sensor to trip or be cancelled.
    Assume - we only take Power Cubes from the ground (not from the 2nd or 3rd layer on in the P.C.Zone)
    Must check - make sure the acquisition sensor is False (no Cube present) before start.
  • Cube Release button press - Game Controller Left Trigger - press this button to let go of a Cube. Does nothing if no cube is present.
  • Cancel button press - Game Controller Back button - cancels the current operation. We need a list of operations that can be canceled.
    Operations that can be canceled - Acquire Cube
  • Raise and lower arm - Game controller D-pad. Up and Down on the D-pad moves the arm up and down. Upon release, software snaps to the nearest pre-set height point. All arm movement is fly-by-wire to prevent the arm from extending past the 16 inch mark.
  • Raise and lower arm fine tune - Game controller left stick. In case the preset needs to be nudged or for manual control of the up-down motion. Provide a dead-zone in the control. Fly-by-wire is still in effect.
  • Climb control - Game controller right stick. Up and down engages the motor to climb up or down. Provide a decent dead-zone in the control. Software interlock to prevent climbing until the last 30 seconds (is this necessary? Is it illegal to climb before the last 30 sec?)
« Last Edit: January 17, 2018, 04:33:59 PM by Louis L »

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #3 on: January 17, 2018, 03:11:29 PM »
Some more thoughts...
  • Raise and Lower Arm fine tune - will operate at a fractional speed of the regular raise and lower. The idea here is to have a means of making fine adjustments if the need should arise. For example, if crates are stacked in a weird way and we have to add an inch to the regular height, this is how it's done. This control is interlocked with the regular Raise and Lower Arm so that both can not be used at the same time.
  • Cube Grab button press - Game controller right bumper - this just closes the jaws of the gripper. Normally it would never be used by itself since Cube acquisition is automatic. However let's say we need to relocate a Cube already on the Scale, we can grab it with this command. It's purely a manual operation and provided just in case it's needed.
« Last Edit: January 26, 2018, 08:18:15 PM by Louis L »

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #4 on: January 17, 2018, 04:37:11 PM »
And yet some more:
  • Intake Up - Game controller Y button - raises the Intake assembly out of harm's way
  • Intake Down - Game controller A button - lowers the Intake assembly

ohad z

  • Newbie
  • *
  • Posts: 15
Re: User Interface
« Reply #5 on: January 21, 2018, 11:35:42 PM »
A few comments:

  • Intake in/out manual operation: in Casey the cube refuses to align and the limit switch / sensor does not trigger, can be used to turn the intake in wither direction to try and rectify the situation
  • Maybe a shortcut of the arm control would come useful - instead of pressing a button 5 times to go all the way up, assign a shortcut button to go there in one click
  • Intake and claw should probably be mutually exclusive
  • Claw and drive should probably be mutually exclusive
  • A method of selecting from the autonomous modes options is necessary. Either through driver station or other method. This, with the value from the FMS regarding color assignment will determine the autonomous mode behavior.
« Last Edit: January 21, 2018, 11:43:13 PM by ohad z »

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #6 on: January 22, 2018, 01:44:24 PM »
Just wanted to add some thoughts to these 3 comments from Ohad:

A few comments:

  • Intake in/out manual operation: in Casey the cube refuses to align and the limit switch / sensor does not trigger, can be used to turn the intake in wither direction to try and rectify the situation
  • Maybe a shortcut of the arm control would come useful - instead of pressing a button 5 times to go all the way up, assign a shortcut button to go there in one click
  • A method of selecting from the autonomous modes options is necessary. Either through driver station or other method. This, with the value from the FMS regarding color assignment will determine the autonomous mode behavior.

  • Manual override of automated functions: we struggle with this balance every year. On the one hand, we want automation to speed things up and take the guesswork out of the equation. On the other hand we can't always trust automation and when that happens need a human touch to bail us out. The real issue here is how to parcel all the needs into a fixed set of user controls without overwhelming the user.
  • Presets and multi-click: multiple clicks of the same button are not a good idea - unless there is a distinct and easy feedback path for the operator to know the current state of the clicks. For some things we can get away with it - like if we're cycling through no more than 3 items. Otherwise, it's not a good UI tool. Individual presets have a different problem  - there are more than enough buttons between the joysticks and the game controller. But it's not a good consistent mapping of button to function. Some teams use a custom built driver console with arcade buttons and joysticks (much like the custom Arcadia controls). Team 1768 does that. I've been thinking of making one to try out. Something like this would give us a chance to use a row or column of buttons for presets.
  • Autonomous selection: This will be done via the driver station dashboard and not the UI. The drive team is not allowed to touch the controls until the teleop period.

ohad z

  • Newbie
  • *
  • Posts: 15
Re: User Interface
« Reply #7 on: January 24, 2018, 06:43:19 PM »
Need a way to switch between robot-centric and field-centric modes for the drive system

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #8 on: January 26, 2018, 11:03:11 AM »
We met on 1/24 to discuss the UI. Students with prior drive team experience were Stav, Pablo and Isha. The goal was to discuss how the user interface will work and what we expect will be needed on the field for PowerUp. It's never easy to predict how a game will play out but we can draw from previous experience to help us get a feel for human-machine interaction.

The most debated issues were:

  • How to operate the arm in terms of getting to a height quickly? So we use preset heights? if so how many and what do these heights correspond to on the field? How do these map to buttons on the user controls?

    The current thought is have 3 different heights corresponding to 3 buttons on the Game Controller (ABXY group). These are the "low"/group position, the switch position, and the Scale position. For the Scale, the height corresponds to a raised position since it's easier to lower from there than to raise from a lower preset. And it's always possible to drop a Cube in a pinch.
  • What level of automation do we have? What are they?

    The current thought is to have a mode where we get a Cube for the Exchange. Another mode is to get a Cube for delivery to either the Scale or Switch. What steps/button will do this is not clear.
Other things discussed include:
  • Alternative driver station consoles other than the usual dual joystick + game controller. This would make a great off-season project.
  • Decision making during play. How likely is a drive team to change their play in mid-stream in response to the changing nature of the game? This involves the man-machine interface ease-of-use, the time constraints in the game, the multi-tasking ability of drive team members, reaction and decision making time, and so much more.
« Last Edit: January 26, 2018, 08:18:55 PM by Louis L »

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #9 on: January 27, 2018, 12:26:49 AM »
Here's another pass at a full-blown user interface (rev 2)

(1) The Game Controller Contains the normal operation controls.

Get Cube - Game Controller Right trigger
Auto function. Move Arm down, activate Intake and ingest a Cube. Tucks it safely away (however that is defined)

Fix Stuck Cube - Game Controller Left Trigger
This button will alter the speed of the right Intake wheel for (1) the button is pressed and (2) the duration that Get the Cube command is active. Its purpose is to handle the case when a Cube is at near 45 degrees to the Intake and the mechanism is unable to ingest the Cube due to the symmetry. By changing one of the wheel's speed, this will unbalance the Intake and rotate the Cube making it easier to ingest.

Release  Cube - Game Controller Left Bumper
Opens the Gripper and let go of the Cube. If there is no Cube, does nothing. Does not move the arm before or after the command. User must use one of the Move Arm buttons to stow away the Arm.

Grab Cube - Game Controller Right Bumper
Auto Function: Closes the Gripper. User is responsible for moving the Arm to the correct location.

Move Arm to Switch height - Game Controller A Button.
Auto function. Move the arm to the specified height, with or without a Cube.

Move Arm to Lower Scale height - Game Controller B Button.

Auto function. Move the arm to the specified height, with or without a Cube.

Move Arm to Upper Scale height - Game Controller Y Button

Auto function. Move the arm to the specified height, with or without a Cube.

Move Arm to Exchange height - Game Controller X Button.
Auto function. Raise Intake and release Cube. Driver pushes Cube from here on.

Climber Up/Down - Game Controller Right Stick.
Motor is on only when stick is engaged. A deadzone is used.
The initial deadzone is +/- 0.5. This is a significant zone that covers 1/2 of the joystick range (to avoid accidental touches of the stick).

Fine Tune Arm Up/Down - Game Controller Left Stick
Arm moves only when stick is engaged. Speed is fractional but proportional to stick movement. A deadzone is used.
The initial fractional speed is 1/4.
The initial deadzone is +/- 0.5. This is a significant zone that covers 1/2 of the joystick range (to avoid accidental touches of the stick).

Cancel Auto Function - Game Controller Back Button
Auto Function: Cancel any currently running Auto Function.
Arm and Intake move to safe/reset position  (however defined) with Cube (if present).

Move Arm to climbing height - Game Controller Start Button
Auto Function. Prelude to climbing the Rung.

(2) The joysticks contain the special functions. These are manual overrides or commands used to bail us out of a tight spot.

Toggle Intake - Right Joystick Button 6

Auto Function: Intake movement should be totally automatic based on the function selected so we should never have to use these controls. In the event we want to manually move the Intake, this button will toggle the position of the Intake up and down.

Intake Flush - Right Joystick Button 7
The original use for Flush was to propel the Cube through the Exchange. But this is a bad idea because the Intake should be Up at the Exchange to avoid potential damage. So Flush is here just in case we need it. Motor operates as long as the button is pressed.

Ditch Cube - Right Joystick Button 8
Auto Function: If we have a Cube, get rid of it. Raise the Intake. Drop the Cube safely to the ground from wherever it's held. One possible use would be if we have a Cube but need to rush over to Climb and just want to drop our load.

Toggle Gyro Use - Right Joystick Button 9
The DriveTrain defaults to FieldCentric. This button toggles the FieldCentric on and off. Only do this if the Gyro is having problems. Otherwise there's never a good reason to operate in robot-centric mode.
« Last Edit: January 30, 2018, 07:19:44 PM by Louis L »

ohad z

  • Newbie
  • *
  • Posts: 15
Re: User Interface
« Reply #10 on: January 27, 2018, 05:48:50 PM »
A few questions/comments:
  • Is “Exchange height” for arm the same as intake height (height required to grab a cube)?
  • Climber up/down: the joystick will activate climber up/down manually (no auto-stop other than safety current draw)?
  • Other than the “get cube” automated command that lowers the intake and the “exchange cube” that raises it, what are the other sequences that move the intake up/down? I would guess once the cube is in and the gripper has grabbed it, the intake can go up.
  • At some point there was an idea to use the triggers to control the intake in/out speed (they are analog and so could change the right/left intake speeds to manage misaligned cubes). Otherwise, if the switches in the intake break, this may come in handy to manually control the intake to be able to pick up a cube

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #11 on: January 27, 2018, 07:40:43 PM »
A few questions/comments:
  • Is “Exchange height” for arm the same as intake height (height required to grab a cube)?
  • Climber up/down: the joystick will activate climber up/down manually (no auto-stop other than safety current draw)?
  • Other than the “get cube” automated command that lowers the intake and the “exchange cube” that raises it, what are the other sequences that move the intake up/down? I would guess once the cube is in and the gripper has grabbed it, the intake can go up.
  • At some point there was an idea to use the triggers to control the intake in/out speed (they are analog and so could change the right/left intake speeds to manage misaligned cubes). Otherwise, if the switches in the intake break, this may come in handy to manually control the intake to be able to pick up a cube

  • The Exchange Height is most likely just putting the Cube on the ground. There are still some details to iron out, some of which we won't know until we have the real hardware. Most importantly though, this Auto Function sets things up for the robot to push the Cube into the Exchange so makes sure the Intake is not deployed.
  • For now, the Climber is entirely manual. The scoring criteria is different from last year; it's easier. Even the sonar as a climbing sensor is there solely to provide information and not to auto-stop the climb. Also the latching onto the Rung is a manual process.
  • Yes. The Intake is only down when getting a Cube and nothing else. There's no reason for it otherwise.
  • Ah, yes. I'll add something for this. I was thinking of a very simple scheme whereby we press a single button and one wheel is throttled back to 1/2 speed for the duration that the button is pressed. So this won't work in Autonomous since it's a manual process.

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #12 on: January 28, 2018, 05:37:35 PM »
The buttons on the Right Joystick need to be remapped. The current choices were made based on the Logitech Xtreme 3D joysticks we use in the lab. The joysticks we use on the competition driver station are older model Logitech units that are ambidextrous. The buttons on those joysticks are placed differently. Will do that in the coming days.

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #13 on: January 30, 2018, 07:18:00 PM »
The buttons on the Right Joystick need to be remapped. The current choices were made based on the Logitech Xtreme 3D joysticks we use in the lab. The joysticks we use on the competition driver station are older model Logitech units that are ambidextrous. The buttons on those joysticks are placed differently. Will do that in the coming days.

Here's the remap onto the Logitech Attack 3 joysticks.

Buttons 7-10 will now be 6 to 9. The previous post with the button map will be updated shortly.

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: User Interface
« Reply #14 on: January 30, 2018, 08:03:28 PM »
Had a conversation with Ohad, BatChen and Matt. Looks like WPILib will handle mutliple button presses and avoid the problems that LabVIEW has. So the priority scheme is mainly for the LabVIEW implementation. Cancel will still have higher priority than other commands in WPIlib implementations. The rest will behave differently as there won't be a priority ordering.