BorisBogaerts / CoppeliaSim-VR-Toolbox

This repository contains the code to experience CoppeliaSim in VR
https://www.youtube.com/watch?v=yMydjviF7yg
BSD 3-Clause "New" or "Revised" License
35 stars 18 forks source link

[CoppeliaSim:error] External call to simCallScriptFunction failed (isRunning@HTC_VIVE): Failed calling script function. #8

Open lshachar opened 4 years ago

lshachar commented 4 years ago

Hi! First of all, great work, thank you so much!

I'm running into a small bug here, I get this error flooding CoppeliaSim's console window, while not running the simulation. The error stops once I'm running the simulation, and resumes once simulation is stopped. However, the VR simulation works just fine. (btw, I'm using WMR headset and controllers through SteamVR, so you can add WMR to the tested platforms if you wish.)

CoppeliaSim edu V 4.1.0 rev.1 64bit installed in the default folder (C:\Program Files\CoppeliaRobotics\CoppeliaSimEdu) (btw, you have the correct path written in copyToVREP.bat: SET vrepLocation=C:\Program Files\CoppeliaRobotics\CoppeliaSimEdu, but the readme.md is wrong: C:\Program Files\CoppeliaSim3\CoppeliaSim_PRO_EDU)

no debug.log file is being created in the VR interface folder, CoppeliaSim VR Toolbox 2.2

since the VR interface console window writes 'Simulation started' - seems like the vr interface must be getting correct values from isRunning function in HTC_VIVE.lua, so it could be that the bug is in coppeliaSim.

output from VR interface console window:

Trying to connect with V-REP ...

Connected to V-REP, clientID number : 0
Connected to V-REP port number : 19997
Wait for simulation start ...
Simulation started

Loaded geometry with handle 14 with 6 vertices and 2 faces vrep name : Plane Visibility layer : 1
    Added texture to shape
Loaded geometry with handle 16 with 984 vertices and 1988 faces vrep name : IRB4600_visible Visibility layer : 1
Loaded geometry with handle 19 with 2118 vertices and 4163 faces vrep name : IRB4600_link1_visible Visibility layer : 1
(...I removed similar 'Loaded geometry' lines before posting)

Number of objects loaded : 131
Added light, angle : 90.0027
Added light, angle : 90.0027
Added light, angle : 90.0027
Added light, angle : 90.0027
Everithing loaded succesfully
Connected to VREP path
fps: 96     Scale: 100%

Wait for simulation start ...
lyl1999923 commented 4 years ago

Same question there.And my steam VR stuck on the start scene of the VREPVIVE.But sometimes it works when I just use one model.So I think maybe my graphic card is not enough to handle it.(NIVIDA GTX 1050ti)

1
lyl1999923 commented 3 years ago

I use Discrete graphics card and it works. Hope it can help you.

lshachar commented 3 years ago

@lyl1999923, your steam vr being stuck bug isn't related to this.

@BorisBogaerts , one way to solve the issue I mentioned above, ('External call to simCallScriptFunction failed' flooding coppeliasim's console window) would be to create an addon script in coppeliasim's installation folder, named simAddOnScript_(script name).lua , the simAddOnScript_ prefix means it will auto-run when coppeliasim starts. that script can have the isRunning function (that is currently in HTC_VIVE.lua), and another test should be added to that script - making sure that there is an HTC_VIVE object present in the current simulation. I haven't tried compiling your code yet, if I did I would make a pull request.

mhaichao commented 2 years ago

Hi everyone,

did anyone come up with a solution to this? I have the same problem. I tested the CoppeliaSim VR Toolbox 2.2 with different versions of CoppeliaSim (4.2, 4.0, 3.6.2). I can see the VR Toolbox fetching a bunch of geometries from CoppeliaSim, but nothing happens in the HTC Vive so far. The tools doesn't seem to load up with SteamVR, it's stuck at the loading screen.

On the Console I also get [CoppeliaSim:error] External call to simCallScriptFunction failed (isRunning@HTC_VIVE): Failed calling script function.

Any help on this?

Thanks!

BorisBogaerts commented 2 years ago

Hi,

Normally out of the box the interface should work. Can you give more details about your setup, and the steps you did to install the interface? Are you using the EDU version of coppeliasim? If I find the time I will check with the latest version of coppeliaSim if some things changed that break the installation procedure. It's been a while since I last worked on this.

mhaichao commented 2 years ago

Hi,

My setup:

I installed following your youtube instructions and I set the vrepLocation and ran the script under admin. I first start the simulation in CoppeliaSim and then the VR Toolbox, where I can see it fetching the geometries from CoppeliaSim. When I put on the headset, it seems to be stuck at the loading screen as shown by a previous poster https://github.com/BorisBogaerts/CoppeliaSim-VR-Toolbox/issues/8#issuecomment-699937191.

I appreciate you looking into it!

Cheers Haichao

BorisBogaerts commented 2 years ago

Hi,

As before I cannot reproduce this issue. If I install everithing the interface just works. I also noticed that the license of coppeliasim changed, so I cannot use it anymore. Are you sure that you use the educational version of coppeliasim, that's the only thing I can think off that might be wrong? Otherwise I would look for issues in your steamVR setup.

Sorry I cannot help you more

Kind regards, Boris

mhaichao commented 2 years ago

Hi @BorisBogaerts ,

thanks for looking into that. Yes, I'm using the educational version. So far I had no luck, but I will post it if a solution comes up.

Cheers Haichao