40823144 cd2021

  • Home
    • Site Map
    • reveal
    • blog
  • About
    • csave
  • CMSiMDE
  • Stage1-ag17
    • 組員
    • W3
  • Stage2-ag10
    • 組員:
    • W5
    • W6
    • W7
    • W8
    • 成品:
  • W13~W14
    • RoboDK
    • Task
      • task1
      • task2
  • W15
  • W16
  • Stage3-ag4
    • Stage3組員
    • 更改1
    • 模擬問題
  • 英文學習中
  • CoppeliaSim
  • ssh
  • heroku
  • DC推廣中心
task1 << Previous Next >> W15

task2

參考老師的bubbleRob模板並於Stage2上進行remoteAPI的模擬。

stage2-ttt檔

remoteAPI程式碼

import sim as vrep
import sys
# child threaded script: 
#simExtRemoteApiStart(19999)
 
vrep.simxFinish(-1)
 
clientID = vrep.simxStart('127.0.0.1', 19999, True, True, 5000, 5)
 
if clientID!= -1:
    print("Connected to remote server")
else:
    print('Connection not successful')
    sys.exit('Could not connect')
 
errorCode,Revolute_joint=vrep.simxGetObjectHandle(clientID,'Revolute_joint',vrep.simx_opmode_oneshot_wait)
 
 
if errorCode == -1:
    print('Can not find left or right motor')
    sys.exit()
 
errorCode=vrep.simxSetJointTargetVelocity(clientID,Revolute_joint,3, vrep.simx_opmode_oneshot_wait)

task1 << Previous Next >> W15

Copyright © All rights reserved | This template is made with by Colorlib