How to use v_repExtJoystick.dll?

Typically: "How do I... ", "How can I... " questions
Post Reply
atoz
Posts: 57
Joined: 18 Oct 2013, 09:02

How to use v_repExtJoystick.dll?

Post by atoz »

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

coppelia
Site Admin
Posts: 10364
Joined: 14 Dec 2012, 00:25

Re: How to use v_repExtJoystick.dll?

Post by coppelia »

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:

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)
Cheers

atoz
Posts: 57
Joined: 18 Oct 2013, 09:02

Re: How to use v_repExtJoystick.dll?

Post by atoz »

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

coppelia
Site Admin
Posts: 10364
Joined: 14 Dec 2012, 00:25

Re: How to use v_repExtJoystick.dll?

Post by coppelia »

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

Post Reply