How to read Joystick in vrep child script dans Linux 16.04

Requests or suggestions for new features
Post Reply
miaohang
Posts: 1
Joined: 22 Jan 2019, 18:39

How to read Joystick in vrep child script dans Linux 16.04

Post by miaohang »

Hi there
I'm new to vrep , i have finished a six wheels robot simulation controlled by a Joystick in an environment Windows, which has a good performance. For reading the information of the Joystick, I have used axes,buttons,rotAxes,slider,pov=simJoy.getData(0) to read the information of the Joystick and
numberOfJoyticks=simJoy.getCount() to count the number of the Joystick
Now I'am going to use the same child script in Linux, I got an error for these two functions [simJoy.getData, simJoy.getCount]. I don't know what should I use for replacing these functions in Linux.

Further, I have installed the driver of the Joystick in Linux, I tested with jstest-gtk and it works.
Forgive my english...

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

Re: How to read Joystick in vrep child script dans Linux 16.04

Post by coppelia »

Hello,

unfortunately, the joystick plugin for V-REP is currently a Windows only project. One would have to write a Linux version, or you can use the ROS environment (also see here).

Cheers

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: How to read Joystick in vrep child script dans Linux 16.04

Post by fferri »

Hello,

you can use this as a starting point: https://github.com/fferri/v_repExtSDL

It uses SDL2 to access the joystick device

Post Reply