Page 1 of 1

How to simulate by runnning python code (remote API)

Posted: 16 Jan 2019, 14:15
by vrep_arrow_forest
I load scene file and run python souce code in cygwin.
In cygwin,it was displayed on the screen in the following

Connected to remote API server

Connection succeeded
('Number of objects in the scene: ', 129)
Setting up succeeded

Next,I want to run def xxx in following code.

Code: Select all


def demo():
    while True:
        Move(0.5, 0.3, 0.2, finally_stop=False)
        ddata = Detect()
        if len(ddata) != 0 and min(map(lambda x: x[2], ddata)) < 0.7:
            print min(map(lambda x: x[2], ddata)) 
            break
    #
    Stop()
    print "finish"

How should I do operation in vrep?