Remote Joystick using SightThe conventional way of controlling the movement of a robot is by using a joystick directlyconnected to the robot. However, in Isaac, the Virtual Gamepad Sight widget can be used to sendsignals simulating to a robot, over thenetwork.
Joystick Setup. QGroundControl allows you to control a vehicle using a joystick or gamepad instead of an RC Transmitter. Flying with a Joystick (or virtual thumb-sticks) is not as responsive as RC Control because joystick information is sent over MAVLink. Joystick and Gamepad support is enabled using the cross-platform SDL2 library. Compatibility with a particular controller depends on SDL.
The widget allows three input mechanisms, of which only one can be used at a time:. A gamepad controllerconnected to the machine running Sight Client, which makes use of the browser’s.
A mouse connected to the machine running Sight Client. The mouse interacts with the virtualmousepad in the widget, that simulates joystick axes. A keyboard connected to the machine running Sight client. Directional keys are assigned on thekeyboard to simulate joystick axes. tickperiod: interval between periodic tick function calls. sightwidgetconnectiontimeout: Time in seconds to wait before automaticallydisconnecting from the Sight Virtual Gamepad Widget instance.
Default is 30 seconds. numvirtualbuttons: Number of buttons on a simulated Joystick that the front-endmousepad or keypad are simulating. The default is 12.
deadmanbutton: Button number for failsafe button. This button number is used in themessages generated from the mousepad or keypad simulating a joystick.
The default is 4. About the Virtual Gamepad WidgetThe following is the Virtual Gamepad Widget in Sight:Elements of the Widget.
Widget ID: A unique ID per widget instance, used to make sure that only one such instance ofthe widget is connected to the backend, so that only one user at a time is in control. Connect to Backend button: Click to make a live and unique connection with the backend.The current connection status shows as green or red icon on the button. Upon successfulconnection, the modes panel is displayed in the center. If the widget remains disconnected,the modes panel remains hidden to disallow user interaction. Mode Selector Buttons: Click to select a mode of operation. The selected/visible modeactivates to be the current mode of operation.
The button for the selected mode switches from greyto green. Virtual Mousepad Joystick dial: Use a connected mouse or touchpad to interact with the dialusing the cursor to send simulated joystick signals to the backend. Seefor more information. Virtual Keypad Joystick presentation: When enabled, displays the current key beingpressed on the connected keyboard. This is only a visual presentation of the key beingpressed.
These are not buttons that can be clicked with a mouse or touchpad. Seefor more information. Backend Connected to Widget display: Shows the ID of the widget instance currently connectedto the backend, as an indication of which user is in control. Connected Standard/Remapped Gamepads display: Shows the number of gamepads currentlyrecognized by the browser running Sight. This widget allows control using a connected controlleronly if a single controller is recognized by the browser.
If multiple controls are connected, allbut one must be disconnected. Using the Virtual Gamepad WidgetIf the procedure in is notcompleted, no VirtualGamepadBridge codelet is instantiated in the backend when launching anapplication. In such a scenario the Sight widget remains disabled with the following message:When setup is complete, the Virtual Gamepad Widget can be used after the following steps areperformed:. Connect to the backend by clicking the Connect to Backend button. Select the desired mode by clicking the corresponding mode button.
The status of a mode isindicated by the color of its button. See for explanation ofthe modes. To disconnect your instance of the widget from the backend, click the same button used before forconnection.Only one instance of such a widget can remain connected to the backend. This prevents multiple Sightusers with multiple Sight instances from attempting to move the same robot at the same time.
Modes of OperationGamepad ModeIn Gamepad mode, a controller or gamepad, connected either wirelessly or via USB to the machinerunning Sight and recognizable by the browser’s controls the robot. Note thatonly one should be connected underthis mode of operation.
If only one standard controller remains connected, the gamepad icon turnsgreen, else the icon color remains grey representing that no controller is usable. The gamepadfunctions as though it is directly connected to the robot.Mousepad ModeTo use the a connected mouse or a touchpad with the mousepad dial, left click and hold on the smalldark colored circle in the center. While keeping the left click pressed, move the cursor to move thedark circle in the bigger circular dial.When the dark circle is in the green zone on the dial, the widget sends simulated joystick messagesto the backend. If it is in the grey zone, no messages are sent to the backend.The dark circle can be moved with only left click pressed, else it returns to its center positionon the dial, indicating no joystick activity.If the cursor moves out of the dial radius, the dark circle resets itself to the center position.The closer the dark circle is to the periphery, the closer a simulated joystick axis value isto its extreme. For example, for slower speeds, the dark circle needs to remain closer to the centerof the dial, within the green zone. For higher speeds, the dark circle must be close to theperiphery.Keypad ModeThe W, S, A, D keys, or any combination of those, on a connected keyboard can be used to sendsimulated joystick axes messages to the robot.The UI indicates when a directional key is pressed or released.