The Version is indeed 4.0.0(this is the name of the folder CoppeliaSim_Edu_V4_0_0_Ubuntu16_04)
i tried the following code in the b0api bindings folder and after downloading the dependancies
Using 2.7 Python i get :
Code: Select all
this is the result from the python script side:
('Received image.', [256, 256])
('Received image.', [256, 256])
('Received image.', [256, 256])
('Received image.', [256, 256])
('Received image.', [256, 256])
('Received image.', [256, 256])
('Simulation step started. Simulation time: ', 0)
*************************************************************************************
** Leaving... if this is unexpected, you might have to adjust the timeout argument **
*************************************************************************************
('Simulation step done. Simulation time: ', 0.05000000074505806)
The simulation doesnt close automatically nor it does it jobs as it do on windows
after a few times of closing the simulation automatically and opening the simulation using the python script i now get this
Code: Select all
Running B0 Remote API client with channel name [b0RemoteApi]
make sure that: 1) the B0 resolver is running
2) CoppeliaSim is running the B0 Remote API server with the same channel name
Initializing...
Connected!
('Received image.', [256, 256])
('Received image.', [256, 256])
('Received image.', [256, 256])
('Received image.', [256, 256])
('Received image.', [256, 256])
('Received image.', [256, 256])
('Simulation step started. Simulation time: ', 0)
*************************************************************************************
** Leaving... if this is unexpected, you might have to adjust the timeout argument **
*************************************************************************************
Traceback (most recent call last):
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/test.py", line 61, in <module>
client.simxStopSimulation(client.simxDefaultPublisher())
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/b0RemoteApi.py", line 49, in __exit__
self.simxSpinOnce();
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/b0RemoteApi.py", line 179, in simxSpinOnce
self._handleReceivedMessage(readData)
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/b0RemoteApi.py", line 62, in _handleReceivedMessage
msg=msgpack.unpackb(msg)
File "/home/ahmed/.local/lib/python2.7/site-packages/msgpack/fallback.py", line 129, in unpackb
ret = unpacker._unpack()
File "/home/ahmed/.local/lib/python2.7/site-packages/msgpack/fallback.py", line 643, in _unpack
ret.append(self._unpack(EX_CONSTRUCT))
File "/home/ahmed/.local/lib/python2.7/site-packages/msgpack/fallback.py", line 643, in _unpack
ret.append(self._unpack(EX_CONSTRUCT))
File "/home/ahmed/.local/lib/python2.7/site-packages/msgpack/fallback.py", line 680, in _unpack
obj = obj.decode("utf_8", self._unicode_errors)
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc4 in position 0: invalid continuation byte
The reponse on coppeliaSimSide was:
Code: Select all
Hello world!
[18:27:02] B0 Remote API: registering streaming function 'GetVisionSensorImage' for client 'UMptxtRIyV' on topic 'b0RemoteApiPub2UMptxtRIyV' (default publisher)
[18:27:02] B0 Remote API: registering streaming function 'GetSimulationStepStarted' for client 'UMptxtRIyV' on topic 'b0RemoteApiPub3UMptxtRIyV' (default publisher)
[18:27:02] B0 Remote API: registering streaming function 'GetSimulationStepDone' for client 'UMptxtRIyV' on topic 'b0RemoteApiPub4UMptxtRIyV' (default publisher)
Simulation started.
[01:00:00.00] B0 Remote API: registering streaming function 'Ping' for client 'UMptxtRIyV' on topic 'b0RemoteApiPub5UMptxtRIyV' (default publisher)
[01:00:00.00] B0 Remote API: destroyed all streaming functions for client '13gy5Zgaeg' after detection of inactivity
Using Python 3.5.2
i get this :
Code: Select all
Running B0 Remote API client with channel name [b0RemoteApi]
make sure that: 1) the B0 resolver is running
2) CoppeliaSim is running the B0 Remote API server with the same channel name
Initializing...
Connected!
*************************************************************************************
** Leaving... if this is unexpected, you might have to adjust the timeout argument **
*************************************************************************************
Traceback (most recent call last):
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/test.py", line 59, in <module>
stepSimulation()
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/test.py", line 36, in stepSimulation
client.simxSpinOnce()
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/b0RemoteApi.py", line 179, in simxSpinOnce
self._handleReceivedMessage(readData)
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/b0RemoteApi.py", line 63, in _handleReceivedMessage
msg[0]=msg[0].decode('ascii')
AttributeError: 'str' object has no attribute 'decode'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/test.py", line 61, in <module>
client.simxStopSimulation(client.simxDefaultPublisher())
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/b0RemoteApi.py", line 49, in __exit__
self.simxSpinOnce();
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/b0RemoteApi.py", line 179, in simxSpinOnce
self._handleReceivedMessage(readData)
File "/home/ahmed/Downloads/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/programming/b0RemoteApiBindings/python/b0RemoteApi.py", line 63, in _handleReceivedMessage
msg[0]=msg[0].decode('ascii')
AttributeError: 'str' object has no attribute 'decode'
2020-04-03 18:21:01 [��Api_pythonClient] error: HB: Context was terminated
and the coppeliaSim Resonpse was
Code: Select all
Hello world!
[18:26:08] B0 Remote API: registering streaming function 'GetVisionSensorImage' for client '13gy5Zgaeg' on topic 'b0RemoteApiPub213gy5Zgaeg' (default publisher)
[18:26:08] B0 Remote API: registering streaming function 'GetSimulationStepStarted' for client '13gy5Zgaeg' on topic 'b0RemoteApiPub313gy5Zgaeg' (default publisher)
[18:26:08] B0 Remote API: registering streaming function 'GetSimulationStepDone' for client '13gy5Zgaeg' on topic 'b0RemoteApiPub413gy5Zgaeg' (default publisher)
Simulation started.
[01:00:00.00] B0 Remote API: registering streaming function 'Ping' for client '13gy5Zgaeg' on topic 'b0RemoteApiPub513gy5Zgaeg' (default publisher)