I'm trying to follow a tutorial from a professor at my university and am running into issues getting the environment correctly set up and connecting to the remote API. I am trying to get the simpleTest.py file to run on my machines and It provides me with the following error message. This seems like an issue with the python import, but I'm not sure. I am also trying to use the pioneer robot within the sim and also have a threaded child script set up on a primitive shape cube that includes the
Code: Select all
simRemoteApi.start(19999)
Code: Select all
Traceback (most recent call last):
File "/Users/pjolender/Github/copeliaSimTutorial2.0/simpleTest.py", line 26, in <module>
sim.simxFinish(-1) # just in case, close all opened connections
NameError: name 'sim' is not defined
----------------------------------------------------
The remoteApi library could not be loaded. Make sure
it is located in the same folder as "sim.py", or
appropriately adjust the file "sim.py"
----------------------------------------------------
--------------------------------------------------------------
"sim.py" could not be imported. This means very probably that
either "sim.py" or the remoteApi library could not be found.
Make sure both are in the same folder as this file,
or appropriately adjust the file "sim.py"
--------------------------------------------------------------
Program started
complexCommandTest.py
depth_image_encoding.py
main.py
pathPlanningTest.py
pController.py
ply.py
readMe.txt
remoteApi.dylib
sendMovementSequence-mov.py
sendMovementSequence-pts.py
sendSimultan2MovementSequences-mov.py
sim.py
simConst.py
simpleSynchronousTest.py
simpleTest.py
synchronousImageTransmission.py
visualization.py
For reference, I'm running python 3.9 using the PyCharm IDE as well as CopelliaSim Edu version 4.3.0 on my personal machines (M1 Mac Mini, and M1 pro MacBook Pro).
Thanks so much for the help!