How to use v_repExtJoystick.dll?
How to use v_repExtJoystick.dll?
I'm new to V-Rep and am working with the LBR4p arm. I'm looking to control it with a joypad (XBox 360 controller) and I found the v_repExtJoystick.dll plugin. I've not been able to find any documentation on how to use this however. How do I go about using this? Any help is appreciated. Thanks
Re: How to use v_repExtJoystick.dll?
Hello,
the joystick plugin is for Windows only. For Linux and ROS there will be a subscriber type in next release (V-REP 3.0.5) to read gamePads: simros_strmcmd_set_joy_sensor.
With the Windows joystick plugin, you can use following code:
Cheers
the joystick plugin is for Windows only. For Linux and ROS there will be a subscriber type in next release (V-REP 3.0.5) to read gamePads: simros_strmcmd_set_joy_sensor.
With the Windows joystick plugin, you can use following code:
Code: Select all
count = simExtJoyGetCount() -- retrieves the number of attached devices
axis, buttons = simExtJoyGetData(deviceIndex) -- retrieves the axis values (table of 3 values) and the button states (bit-coded)
Re: How to use v_repExtJoystick.dll?
Hi, thanks. Yeah I forgot to mention that I'm on windows. Is that all there is to it or is there an API somewhere I can refer to? Cheers
Re: How to use v_repExtJoystick.dll?
Those 2 functions are not documented in the user manual. But you can always refer to the source code.
Have a look at file programming/windowsOnlyProjects/v_repExtJoystick/v_repExtJoystick.cpp.
Cheers
Have a look at file programming/windowsOnlyProjects/v_repExtJoystick/v_repExtJoystick.cpp.
Cheers