Joystick Mixer Node

From RoboPad Wiki
Jump to navigation Jump to search

← Return to Node Catalogue

Joystick Mixer Node
Inputs
  • xaxis
  • yaxis
Outputs
  • left drive
  • right drive
Version Introduced
2.1

The Joystick Mixer Node is a single-purpose node that takes x and y axis signals, ostensibly from a Joystick Node and mixes them to generate left/right differential drive motor drive signals that can be passed to H-Bridge IO Units.

Joystick Mixer Nodes were introduced in firmware version 2.1 along with all basic nodes. It has no configurable settings.

A demonstration controller built using a Joystick Node, a Joystick Mixer Node and Indicator Nodes. Notice how the x and y axis values from the joystick are transformed into forward/backward drive motor signals (here scaled and translated so that they range from -1 to 1, and then inverted on the "backwards" indicators so that they can be displayed using Indicator Nodes).

Inputs

Joystick Mixer Nodes have two input ports: xaxis and yaxis, which - just as their counter parts in the Joystick Node's output ports - represent a position between (0, 0) and (1, 1) on a dual-axis joystick, where (0.5, 0.5) is the central position - the neutral position where no motion should occur.

Outputs

Joystick Mixer Nodes have two output ports: left drive and right drive that reprsent the velocity of a left or right drive motor in a differential drive robot, from 0 to 1 where 0 is fully reverse and 1 is fully forward - just as should be used for H-Bridge IO Unit input ports.

Example Use

Below is shown is how you might use the Joystick Mixer Node in a nodegraph to drive M1 and M2 on a default RoboPad.
Basic-joystick-drive.png


Conversely, the example gif above was achieved using this nodegraph:
Joystick-mixer-demo-nodegraph.png