In [ ]:
# Copyright 2006-2014 Coppelia Robotics GmbH. All rights reserved.
# marc@coppeliarobotics.com
# www.coppeliarobotics.com
# 
# -------------------------------------------------------------------
# THIS FILE IS DISTRIBUTED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTY. THE USER WILL USE IT AT HIS/HER OWN RISK. THE ORIGINAL
# AUTHORS AND COPPELIA ROBOTICS GMBH WILL NOT BE LIABLE FOR DATA LOSS,
# DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR
# MISUSING THIS SOFTWARE.
# 
# You are free to use/modify/distribute this file for whatever purpose!
# -------------------------------------------------------------------
#
# This file was automatically created for V-REP release V3.2.0 on Feb. 3rd 2015

# Make sure to have the server side running in V-REP: 
# in a child script of a V-REP scene, add following command
# to be executed just once, at simulation start:
#
# simExtRemoteApiStart(19999)
#
# then start simulation, and run this program.
#
# IMPORTANT: for each successful call to simxStart, there
# should be a corresponding call to simxFinish at the end!

In [1]:
import vrep

print ('Program started')
vrep.simxFinish(-1) # just in case, close all opened connections
clientID=vrep.simxStart('127.0.0.1',19997,True,True,5000,5)
clientID


Program started
Out[1]:
0

In [1]:
import vrep

In [2]:
clientID=vrep.simxStart('127.0.0.1',19997,True,True,5000,5)
clientID


Out[2]:
0

In [3]:
res,objs=vrep.simxGetObjects(clientID,
                             vrep.sim_handle_all,
                             vrep.simx_opmode_oneshot_wait)
res, objs


Out[3]:
(3, [])

In [ ]:


In [4]:



Program started
Connected to remote API server
('Number of objects in the scene: ', 47)
Program ended

In [ ]: