07-23-2024, 04:02 PM
Hi,
I have a question regarding capturing a collision via the Python API. I want to run a master program in my simulation via the API and catch any collisions that may occur. I would like to print some information about the collision and then move on with the simulation program.
I was hoping that the code block above would catch collisions but it doesn't. Any suggestions?
I have a question regarding capturing a collision via the Python API. I want to run a master program in my simulation via the API and catch any collisions that may occur. I would like to print some information about the collision and then move on with the simulation program.
Code:
try:
RDK.setSimulationSpeed(speed=1)
RDK.setCollisionActive(check_state=COLLISION_ON)
mstr_program.RunProgram()
mstr_program.WaitFinished()
except Exception as error:
print(error)
I was hoping that the code block above would catch collisions but it doesn't. Any suggestions?