I am using the remote server that is initiated when V-Rep starts, with the following parameters in the remoteApiConnections.txt file:
Code: Select all
portIndex1_port = 19997
portIndex1_debug = false
portIndex1_syncSimTrigger = true
Code: Select all
import vrep
# configure server connection parameters
remote_server_address = '127.0.0.1' # loopback address for V-Rep and ROS run locally
remote_server_port = 19997 # set in vrep/remoteApiConnections.txt
wait_for_connection = True
dont_reconnect_on_disconnect = False
connecting_timeout = 2000 # 2 s timeout
comm_thread_cycle = 5 # 5 ms communication cycle
# attempt connection to the remote server
vrep.simxFinish(-1) # kill any other client connections
self.client_id = -1
while self.client_id == -1:
self.client_id = vrep.simxStart(remote_server_address, remote_server_port, wait_for_connection,
dont_reconnect_on_disconnect, connecting_timeout, comm_thread_cycle)
if self.client_id == -1:
rospy.logerr('Connection to V-Rep remote server failed. Retrying...')
rospy.logwarn('Connection to V-Rep remote server successful.')
Code: Select all
vrep.simxGetPingTime(self.client_id)
I also get return codes of 3 when attempting to get object handles, and a return code of 1 from the command simxStartSimulation.
This behavior persists if I start the server from a non-threaded child script in a scene, if I disable the synchronous trigger, and if I use a different port.
I am currently runnin V-Rep Pro Edu, Version 3.5.0 (rev. 0) 64bit (serialization version 21) (Qt Version 5.9.0, GCC)
I am confident my computer is powerful enough to run V-Rep at the default simulation step size of 50 ms and a very simple scene. What could perhaps be the issue?