Page 1 of 1

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

Posted: 29 Oct 2015, 09:47
by jacobi
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!

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

Posted: 29 Oct 2015, 16:22
by coppelia
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

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

Posted: 01 Nov 2015, 19:38
by jacobi
Thanks for your prompt reply.

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.

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

Posted: 02 Nov 2015, 10:18
by coppelia
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

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

Posted: 04 Nov 2015, 09:35
by jacobi
Thanks, I will try to test the Lua bindings for SDL and give a report later.

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

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

Posted: 04 Nov 2015, 19:19
by coppelia
oh, great, that's even better. Didn't know about that Lua extension library!

Keep us updated if possible.

Cheers

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

Posted: 22 Feb 2016, 17:27
by coppelia
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

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

Posted: 23 Feb 2016, 15:42
by Tobias
Ok, sounds good. I will try it.

Cheers,Tobi