Does V-Rep supports such kind of joystick: 3DConnexion

Typically: "How do I... ", "How can I... " questions
jacobi
Posts: 11
Joined: 13 Aug 2015, 22:27

Does V-Rep supports such kind of joystick: 3DConnexion

As Coppelia said in another thread:
coppelia wrote:On the Windows version there should be a readily available Joystick interface. Check functions:

Code: Select all

	local joysticCount=simExtJoyGetCount()
local axes_3,nuttons,rotAxes_3,sliders_2,pov_4=simExtJoyGetData(joysticZeroBasedIndex)

Check also its source code in programming/windowsOnlyProjects/v_repExtJoystick

With ROS, you can use programming/ros_packages/vrep_joy

Or of course do it yourself by interfacing via plugin or the remote API an existing library.

Cheers
I wonder if any one have tested if the v_repExtJoystick supports 3DConnexion.
Since I cannot find 3DConnexion in the forum. So I create this new post as a placeholder, in case others share the same interest.

Many thanks!

coppelia
Posts: 8125
Joined: 14 Dec 2012, 00:25

Re: Does V-Rep supports such kind of joystick: 3DConnexion

Hello,

that plugin doesn't support 3D mouses, but I know that some have created a Python interface to V-REP, using one common Python lib, can't remember right now, now where you can find it. Sorry, I just realize that doesn't sound very helpful.

Cheers

jacobi
Posts: 11
Joined: 13 Aug 2015, 22:27

Re: Does V-Rep supports such kind of joystick: 3DConnexion

I found in the 3dConnexion forum a topic on comparing DI with the 3DxWare driver.
http://www.3dconnexion.com/forum/viewtopic.php?t=1610

I have sent them an email to request the DI examples, and I hope I can get it.
If it will be too hard, then I prefer to use the 3DxWare and give another try.

coppelia
Posts: 8125
Joined: 14 Dec 2012, 00:25

Re: Does V-Rep supports such kind of joystick: 3DConnexion

There is a Python library called Pygame that uses SDL, that apparently supports that type of input devices.

For instance:

Code: Select all

pygame.joystick.get_count()
joystick1=pygame.joystick.Joystick(0)
axisX=joystick1.get_axis(x)
buttonX=joystick1.get_button(x)
...
Haven't tried it however. But I know that some use it to read out a space mouse and send the data to V-REP via the remote API.

The better approach however is via a plugin like you suggested. We can assist you with the plugin for the V-REP-side related things, if you wish.

Cheers

jacobi
Posts: 11
Joined: 13 Aug 2015, 22:27

Re: Does V-Rep supports such kind of joystick: 3DConnexion

Thanks, I will try to test the Lua bindings for SDL and give a report later.

Lua
Lua-SDL2 - https://github.com/Tangent128/luasdl2

coppelia
Posts: 8125
Joined: 14 Dec 2012, 00:25

Re: Does V-Rep supports such kind of joystick: 3DConnexion

oh, great, that's even better. Didn't know about that Lua extension library!

Keep us updated if possible.

Cheers

coppelia
Posts: 8125
Joined: 14 Dec 2012, 00:25

Re: Does V-Rep supports such kind of joystick: 3DConnexion

Hello Tobi,

we haven't tried it ourselves, but we know that it works fine, from a customer that did it (on Windows, too).

Cheers

Tobias
Posts: 21
Joined: 08 Jan 2016, 14:35

Re: Does V-Rep supports such kind of joystick: 3DConnexion

Ok, sounds good. I will try it.

Cheers,Tobi