Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running to task_reset() #12

Open
Starsshine21 opened this issue Apr 17, 2024 · 1 comment
Open

Error while running to task_reset() #12

Starsshine21 opened this issue Apr 17, 2024 · 1 comment

Comments

@Starsshine21
Copy link

When I tried to write my own python script to run, like RLBench, I encountered two problems: 1. The photos of the five cameras are all black. 2.When the code was executed to task.reset(), I encountered an error with the following specific information:
External call to simCallScriptFunction failed (_WriteCustomDataBlock@PyRep): Script function doe not exist.
After the error occurred, V-REP crashed.
In terminal:
Traceback (most recent call last):
File "test.py", line 77, in
descriptions, obs = task.reset()
File "/home/xiesenwei/robotics/VLMBench/vlmbench/amsolver/task_environment.py", line 93, in reset
desc = self._scene.init_episode(
File "/home/xiesenwei/robotics/VLMBench/vlmbench/amsolver/backend/scene.py", line 131, in init_episode
self.descriptions = self._active_task.init_episode(index)
File "/home/xiesenwei/robotics/VLMBench/vlmbench/vlm/tasks/drop_pen_color.py", line 26, in init_episode
return super().init_episode(index)
File "/home/xiesenwei/robotics/VLMBench/vlmbench/vlm/tasks/drop_pen.py", line 49, in init_episode
waypoints = GraspTask.get_path(try_ik_sampling=False, ignore_collisions=True)
File "/home/xiesenwei/robotics/VLMBench/vlmbench/amsolver/backend/unit_tasks.py", line 284, in get_path
WriteCustomDataBlock(waypoint.get_handle(),"waypoint_type","pre_grasp")
File "/home/xiesenwei/robotics/VLMBench/vlmbench/amsolver/backend/utils.py", line 276, in WriteCustomDataBlock
pyrep_utils.script_call('_WriteCustomDataBlock@PyRep', PYREP_SCRIPT_TYPE,
File "/home/xiesenwei/anaconda3/envs/vlm/lib/python3.8/site-packages/pyrep/backend/utils.py", line 65, in script_call
return sim.simExtCallScriptFunction(
File "/home/xiesenwei/anaconda3/envs/vlm/lib/python3.8/site-packages/pyrep/backend/sim.py", line 698, in simExtCallScriptFunction
_check_return(ret)
File "/home/xiesenwei/anaconda3/envs/vlm/lib/python3.8/site-packages/pyrep/backend/sim.py", line 27, in _check_return
raise RuntimeError(
RuntimeError: The call failed on the V-REP side. Return value: -1

Error: signal 11:

/home/xiesenwei/robotics/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04/libcoppeliaSim.so.1(_Z11_segHandleri+0x30)[0x7f4ba9411ae0]
/lib/x86_64-linux-gnu/libc.so.6(+0x43090)[0x7f4c4bd49090]
/home/xiesenwei/robotics/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04/libQt5Core.so.5(_ZNK18QThreadStorageData3getEv+0x2b)[0x7f4ba6e3d1eb]
/home/xiesenwei/robotics/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04/libQt5OpenGL.so.5(_Z19qt_qgl_paint_enginev+0x2d)[0x7f4ba8ba61ed]
/home/xiesenwei/robotics/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04/libQt5Widgets.so.5(_ZN14QWidgetPrivate11repaint_sysERK7QRegion+0x94)[0x7f4ba84a5094]
/home/xiesenwei/robotics/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04/libQt5Widgets.so.5(_ZN14QWidgetPrivate16syncBackingStoreEv+0x5f)[0x7f4ba84bea6f]
/home/xiesenwei/robotics/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04/libQt5Widgets.so.5(_ZN7QWidget5eventEP6QEvent+0x300)[0x7f4ba84d5920]
/home/xiesenwei/robotics/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04/libQt5Widgets.so.5(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x9c)[0x7f4ba849792c]
/home/xiesenwei/robotics/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04/libQt5Widgets.so.5(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x2b0)[0x7f4ba849ead0]
/home/xiesenwei/robotics/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04/libQt5Core.so.5(_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent+0x108)[0x7f4ba7005008]
QMutex: destroying locked mutex

Meanwhile, I encountered an error while running dataset generator NLP. py in the tools directory: The call failed on the V-REP side Return value: -1

Thanks for any help

@KzZheng
Copy link
Collaborator

KzZheng commented Apr 25, 2024

I think you forgot to copy the simAddOnScript_PyRep.lua from the current folder into the Coppliasim folder. Remember to do that every time after you install PyRep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants