OS: Windows 10 Pro 64-bit
V-REP: V-REP PRO EDU 3.6.2 64-bit
Haptics Devices: Two (2) 3D Systems Touch, USB version (previously known as Geomagic Phantom Omni)
Haptics Library: Chai3D 3.2.0, Windows version
I managed to have the two haptics devices recognized by Chai3D. One was named "Default Device" and the other named "Phantom2". In the Chai3D example "02-multi-devices" both devices are recognized and have force feedback.
I copied "hdPhantom64.dll" to "C:\Program Files\V-REP3\V-REP_PRO_EDU", then the two V-REP examples under "chai3d-3.2.0\modules\V-REP\examples" work. Although the second device has bright blue light (indicates as recognized), only the first device is doing the teleoperation. It is okay.
My goal is to use both two haptics devices to control a dual-arm robotic system in V-REP, so I tried to modify the Lua script associated with the "hapticDevice" in one of the examples, "01-V-REP-shapes.ttt".
Here is part of the original Lua script code:
Code: Select all
if (sim_call_type==sim.syscb_sensing) then
if CHAI3DPluginInitialized then
-- Read the position of the cursor:
local p=simExtCHAI3D_readPosition(0)
-- Reflect the position of the cursor in V-REP:
sim.setObjectPosition(toolSphereHandle,modelHandle,p)
-- Read the the interaction force:
local f=simExtCHAI3D_readForce(0)
-- Read the buttons of the device:
local currentButtonStates=simExtCHAI3D_readButtons(0)
end
end
However, both devices have bright blue light coming from the inkwell.
May I get some instructions from you guys? Many thanks.