Gamepad Manipulation [omni.isaac.manip]¶
This extension provides an interface to connecting with a gamepad controller.
Example
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")
manip_interface.bind_gamepad(myfunc)
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.
- Parameters
arg0 (
arg0: Callable[[int, float], None]
) – The callback function, where the input arguments of this function is anint
representing an axis of the gamepad and afloat
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¶