Gamepad Manipulation [omni.isaac.manip]

This extension provides an interface to connecting with a gamepad controller.


To use this interface you must first call the acquire interface function. To connect with gamepad, you bind to the gamepad before using it, and unbind with it at the end.

from omni.isaac.manip import _manip, GamePadAxis

manip_interface = _manip.acquire_manip_interface()

def myfunc(axis: GamePadAxis, data: float):
    print("called!  Axis is ", axis, " signal is", data)
    if axis == GamePadAxis.eLeftStickX:
        print("****in LX")
    elif axis == GamePadAxis.eLeftStickY:
        print("****in LY")
    if axis == GamePadAxis.eRightStickX:
        print("****in RX")
    elif axis == GamePadAxis.eRightStickY:
        print("****in RY")


Refer to the kaya sample documentation for more examples and usage

class ManipInput

Bases: pybind11_builtins.pybind11_object

bind_gamepad(self: omni.isaac.manip._manip.ManipInput, arg0: Callable[[int, float], None])None

Bind to gamepad. Gamepad must be plugged in before calling the bind function.


arg0 (arg0: Callable[[int, float], None]) – The callback function, where the input arguments of this function is an int representing an axis of the gamepad and a float value detected on that axis”.

unbind_gamepad(self: omni.isaac.manip._manip.ManipInput)None

Unbind gamepad, called to release gamepad connection properly.

acquire_manip_interface(plugin_name: str = None, library_path: str = None)omni::isaac::manip::Input
release_manip_interface(arg0: omni::isaac::manip::Input)None
class GamePadAxis(value)

Enum used for convenience when checking the axis sent to the registered callback from bind_gamepad

eCount = 6
eLeftStickX = 0
eLeftStickY = 1
eLeftTrigger = 4
eNone = -1
eRightStickX = 2
eRightStickY = 3
eRightTrigger = 5