CoppeliaSimEdu(v4.2.0) CHAI3D plugin load success. But the demo "02-V-REP-Pioneer.ttt" is not work
CoppeliaSimEdu(v4.2.0) CHAI3D plugin load success. But the demo "02-V-REP-Pioneer.ttt" is not work
OS : Win 10 (64bit)
compiler: Visual Studio 2019, Release x64.
CoppeliaSimEdu: V4.2.0( rev.5) 64bit
chai3d version:chai3d-3.2.0-multiplatform
Haptic Devices: Geomagic Touch 3D
----------------------------------
I compile the CHAI3D source code (chai3d-3.2.0-multiplatform) in VS2019, and copy the compiled files "v_repExtCHAI3D.dll" to CoppeliaSimEdu root folder(C:\Program Files\CoppeliaRobotics\CoppeliaSimEdu),the CHAI3D plugin can load success.
But when load the demo "02-V-REP-Pioneer.ttt" and start simulation, the error is as follows:
------------------
[Pioneer_p3dx@childScript:error] [string "Pioneer_p3dx@childScript"]:33: attempt to index a nil value (global 'simCHAI3D')
stack traceback:
[string "Pioneer_p3dx@childScript"]:33: in function 'sim_code_function_to_run'
------------------
How to fix it?
compiler: Visual Studio 2019, Release x64.
CoppeliaSimEdu: V4.2.0( rev.5) 64bit
chai3d version:chai3d-3.2.0-multiplatform
Haptic Devices: Geomagic Touch 3D
----------------------------------
I compile the CHAI3D source code (chai3d-3.2.0-multiplatform) in VS2019, and copy the compiled files "v_repExtCHAI3D.dll" to CoppeliaSimEdu root folder(C:\Program Files\CoppeliaRobotics\CoppeliaSimEdu),the CHAI3D plugin can load success.
But when load the demo "02-V-REP-Pioneer.ttt" and start simulation, the error is as follows:
------------------
[Pioneer_p3dx@childScript:error] [string "Pioneer_p3dx@childScript"]:33: attempt to index a nil value (global 'simCHAI3D')
stack traceback:
[string "Pioneer_p3dx@childScript"]:33: in function 'sim_code_function_to_run'
------------------
How to fix it?
Last edited by zhangm365 on 25 Jun 2021, 03:09, edited 5 times in total.
Re: V-REP (V4.2) CHAI3D plugin load success. But the demo "02-V-REP-Pioneer.ttt" is not work
Hello,
the v_repExtCHAI3D.dll source code provided with CHAI3D is outdated. Please use the up-to-date source code from this repository.
Also use the demo scene scenes/hapticRobot.ttt and model models/other/Interface to haptic device.ttm from CoppeliaSim's package.
Cheers
the v_repExtCHAI3D.dll source code provided with CHAI3D is outdated. Please use the up-to-date source code from this repository.
Also use the demo scene scenes/hapticRobot.ttt and model models/other/Interface to haptic device.ttm from CoppeliaSim's package.
Cheers
Re: V-REP (V4.2) CHAI3D plugin load success. But the demo "02-V-REP-Pioneer.ttt" is not work
OK, thanks your apply. I have replaced the corresponding file( from ...\chai3d-3.2.0-multiplatform\chai3d-3.2.0\modules\V-REP\src\v_repExtCHAI3D.cpp and v_repExtCHAI3D.h to simExtCHAI3D.cpp and simExtCHAI3D.h) according to your instructions, and pull the [https://github.com/CoppeliaRobotics/common] and [https://github.com/CoppeliaRobotics/include], this is ok ?
However, I can successfully compile the CHAI3D-V-REP-VS2015.sln with VS2019, and copy the generated files(..\chai3d-3.2.0-multiplatform\chai3d-3.2.0\modules\V-REP\bin\win-x64) to folder C:\Program Files\CoppeliaRobotics\CoppeliaSimEdu.
But, the CHAI3D plugin is load failed!
However, I can successfully compile the CHAI3D-V-REP-VS2015.sln with VS2019, and copy the generated files(..\chai3d-3.2.0-multiplatform\chai3d-3.2.0\modules\V-REP\bin\win-x64) to folder C:\Program Files\CoppeliaRobotics\CoppeliaSimEdu.
But, the CHAI3D plugin is load failed!
Re: V-REP (V4.2) CHAI3D plugin load success. But the demo "02-V-REP-Pioneer.ttt" is not work
You are using the newest CoppeliaSimLib source code, the one in development. Please use the source code that corresponds to current release, the one with tag coppeliasim-v4.2.0-rev5 and try again.
Cheers
Cheers
Re: V-REP (V4.2) CHAI3D plugin load success. But the demo "02-V-REP-Pioneer.ttt" is not work
How to compile this library? Is there a corresponding document?
Re: CoppeliaSimEdu(v4.2.0) CHAI3D plugin load success. But the demo "02-V-REP-Pioneer.ttt" is not work
There is a Qt project file: simExtCHAI3D.pro
If you do not have Qt, you can install it. Otherwise you can try to adapt the MSVC project file from your other source: it shouldn't be too complicated, since you only need following source files from CoppeliaSim:
If you do not have Qt, you can install it. Otherwise you can try to adapt the MSVC project file from your other source: it shouldn't be too complicated, since you only need following source files from CoppeliaSim:
- programming/simExtCHAI3D/simExtCHAI3D.h
- programming/include/scriptFunctionData.h
- programming/include/scriptFunctionDataItem.h
- programming/include/simLib.h
- programming/simExtCHAI3D/simExtCHAI3D.cpp
- programming/common/scriptFunctionData.h
- programming/common/scriptFunctionDataItem.h
- programming/common/simLib.h
Re: CoppeliaSimEdu(v4.2.0) CHAI3D plugin load success. But the demo "02-V-REP-Pioneer.ttt" is not work
Let me see if we have somewhere a haptic device and can try out this... is has been a while...
Re: CoppeliaSimEdu(v4.2.0) CHAI3D plugin load success. But the demo "02-V-REP-Pioneer.ttt" is not work
Ok, we found one and were able to test. On Windows, we compiled it with Qt, using following:
Use above if you wish to compile with vs, by filling the appropriate project parameters.
You can also contact us for the dll.
Cheers
Code: Select all
QT -= core
QT -= gui
TARGET = simExtCHAI3D
TEMPLATE = lib
DEFINES -= UNICODE
DEFINES += QT_COMPIL
CONFIG += shared
INCLUDEPATH += "../include"
*-msvc* {
QMAKE_CXXFLAGS += -O2
QMAKE_CXXFLAGS += -W3
}
win32 {
DEFINES += WIN_SIM
DEFINES += M_PI 3.14159265358979323846
INCLUDEPATH += "e:/chai3d-3.2.0/external/Eigen"
INCLUDEPATH += "e:/chai3d-3.2.0/external/glew/include"
INCLUDEPATH += "e:/chai3d-3.2.0/src"
LIBS += "e:/chai3d-3.2.0/lib/Release/x64/chai3d.lib"
LIBS += opengl32.lib
LIBS += glu32.lib
LIBS += User32.lib
LIBS += Winmm.lib
LIBS += Ole32.lib
LIBS += Shell32.lib
}
HEADERS += \
simExtCHAI3D.h \
../include/scriptFunctionData.h \
../include/scriptFunctionDataItem.h \
../include/simLib.h
SOURCES += \
simExtCHAI3D.cpp \
../common/scriptFunctionData.cpp \
../common/scriptFunctionDataItem.cpp \
../common/simLib.cpp
You can also contact us for the dll.
Cheers
Re: CoppeliaSimEdu(v4.2.0) CHAI3D plugin load success. But the demo "02-V-REP-Pioneer.ttt" is not work
I am sorry, I should have said to make sure the include and common repository's version matches current release. Meaning this version of include and that version of common.
Cheers
Cheers