V-rep 程式應用

從 irb360 程式中找尋可能用到的並嘗試解釋和整理。


simGetObjectHandle - 對物件命名

用法: number objectHandle=simGetObjectHandle(string objectName)


simSetJointTargetPosition - 設置目標位置(if the joint is in torque/force mode)(motor and position control are enabled)

用法: number result=simSetJointTargetPosition(number objectHandle,number targetPosition)


simGetJointPosition - 得到軸的位置(不能使用在關節上 , 用simGetJointMatrix取代)

用法: number position=simGetJointPosition(number objectHandle)


simSwitchThread - 轉換到另一個程式

用法: number result=simSwitchThread()


simAddStatusbarMessage - 增加一則訊息到狀態欄

用法: number result=simAddStatusbarMessage(string message)


simSetIkElementProperties - 設置性質的特定反向運動元素

用法: number result=simSetIkElementProperties(number ikGroupHandle,number tipDummyHandle,number constraints,table_2 precision=nil,table_2 weight=nil

補充: IK = Inverse kinematics(在左邊功能區第三個裡)


simSetJointMode - 設置joint的操作模式

用法: number result=simSetJointMode(number jointHandle,number jointMode,number options)

補充: option(現在設定為0是可以被使用,如果設定為1會啟用hybrid mode)

jointMode
sim_jointmode_passive
sim_jointmode_motion_deprecated
sim_jointmode_ik
sim_jointmode_ikdependent
sim_jointmode_dependent
sim_jointmode_force


simGetObjectAssociatedWithScript - 擷取角本附加到物體處理

用法: number objectHandle=simGetObjectAssociatedWithScript (number scriptHandle)

補充: scriptHandle = sim_handle_self


simRMLMoveToJointPositions - 在同一時間幾個關節一起使用Reflexxes Motion Library type IV移動(驅動)。這功能只能在child scripts中一個thread中運行(因為這是一個阻塞的操作),而且C-API的不可使用。

用法:number result , table newPos , table newVel , table newAccel , number timeLeft = simRMLMoveToJointPositions ( table jointHandles , number flags , table currentVel , table currentAccel , table maxVel , table maxAccel , table maxJerk , table targetPos , table targetVel , table direction)

補充:
jointHandles: 要驅動的joint
flags: RML flags. -1 for default flags.
currentVel: the current velocity of the joints. Can be nil in which case a velocity vector of 0 is used.
currentAccel: the current acceleration of the joints. Can be nil in which case an acceleration vector of 0 is used.
maxVel: the maximum allowed velocity of the joints
maxAccel: the maximum allowed acceleration of the joints
maxJerk: the maximum allowed jerk of the joints
targetPos: the desired target positions of the joints
targetVel: the desired velocity of the joints at the target. Can be nil in which case a velocity vector of 0 is used.
direction: the desired rotation direction for cyclic revolute joints: 0 for the shortest distance, -x for a movement towards negative values, +x for a movement towards positive values (n=(x-1) represents the number of additional turns). Can be nil or omitted, in which case a value of 0 is used for all joints


(待補充)


Comments

comments powered by Disqus