How to execute sysCall_sensing() from B0 API

Typically: "How do I... ", "How can I... " questions
Post Reply
dlmed
Posts: 10
Joined: 24 Apr 2020, 03:01

How to execute sysCall_sensing() from B0 API

Post by dlmed »

Hey! I'm running a remote API from python (B0 based), then when I start the simulation from python, the code from Accelerometer sensor (inside CoppeliaSim) doesn't run, so I guess neither the Main script runs. So, how do I run the sysCall_sensing() inside Accelerometer script in order to get the data and use it in my code?

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: How to execute sysCall_sensing() from B0 API

Post by coppelia »

Hello,

see my post to your other question. You should not call a blocking function from outside. Rather call a function that will trigger some calculations, later.
From your other post, the script attached to your gyro sensor might not have been yet initialized when called from outside. This can happen when your simulation is not yet running (or has just started), if you try to call a simulation script.
What you can do instead is call a customization script instead (a customization script will also be initialized when simulation is not running).

Cheers

dlmed
Posts: 10
Joined: 24 Apr 2020, 03:01

Re: How to execute sysCall_sensing() from B0 API

Post by dlmed »

Thanks for the reply!

Post Reply