Page 1 of 1

More axis support in the joystick plugin

Posted: 15 Apr 2014, 14:28
by darius
Hi,

I am developing control for a robot using the Logitech RumblePad 2 and the existing windows joystick plugin. This works great with one exception: it only supports 3 axis. And I need very much the 4th axis for my complex control. I hope very much that is not too much effort to add the support for the 4th axis and that it could be added before not too long. It looks like there is no need to change the existing joystick API.

The d-pad also is not supported, but this is not a big issue. For not the 10 buttons that work is a good solution.

Did I understood correctly that I have lots of trouble if I want to run ROS on Windows? If yes, then would be your suggestion for an alternative path to create my own full support for the RumblePad? I would like to continue using the Windows platform.

Best regards,
Darius

Re: More axis support in the joystick plugin

Posted: 15 Apr 2014, 23:14
by coppelia
Hello Darius,

the current implementation of the joystick plugin returns only 3 axis and the button states (i.e. 2 data sets). We have modified the plugin so that it returns more infos (i.e. 5 data sets):

Code: Select all

table_3 axes, number buttons, table_3 rotAxis, table_2 sliders, table_4 PovValues = simExtJoyGetData(number joystickIndex)
The returned values correspond to the first 9 entries in this page. Not sure if your 4th axis will be mapped onto one of those.

The updated plugin, with source code can be downloaded here.

If you want to recompile the plugin yourself, you will have to download the DirectX SDK.

Cheers

Re: More axis support in the joystick plugin

Posted: 17 Apr 2014, 12:58
by darius
Thank you very much for the fix and advices.
I will try to recompile my self.

Re: More axis support in the joystick plugin

Posted: 19 Apr 2014, 12:58
by darius
OK, I found that the compiled DLL was already included in the zip, so I did not try to compile it myself.

Everything seems to work as expected.

Re: More axis support in the joystick plugin

Posted: 10 Mar 2015, 23:55
by darekm
It seems to be still an issue in the latest version (lack of axis[4]), can you provide the code for the plugin again ?

Re: More axis support in the joystick plugin

Posted: 11 Mar 2015, 09:34
by coppelia
Hello,

we haven't implemented any axis[4]. Just as described in our previous post above.
The source code can be found in programming/windowsOnlyProjects/v_repExtJoystick

Cheers

Re: More axis support in the joystick plugin

Posted: 16 Mar 2015, 18:17
by darekm
Is there a manual somewhere which will tell me how to compile it?

Re: More axis support in the joystick plugin

Posted: 16 Mar 2015, 21:36
by coppelia
There is a VS2005 project file. But you will also need to install the DirectX SDK.

Cheers

Re: More axis support in the joystick plugin

Posted: 15 Feb 2018, 08:51
by skitano
Hi,

I know this thread was closed long time ago, but I also wanted to read 4th axis of the joystick.
But In my case which uses Logicool gamepad F310, rotAxes[3] is the 4th axis of the joystick!

With this plugins, it became lot easier to control v-rep model, thanks!

Re: More axis support in the joystick plugin

Posted: 15 Feb 2018, 09:32
by coppelia
It is difficult to predict how the different joystick makers (or different joystick models) are forwarding their signals. Some some that have 2 linear axis and a rotation will put the rotation signal as the 3rd linear axis.

Cheers