simsetIntegerSignaloccupy21 simsetJointTargetVelocityleftmotor0 simsetJointTargetVelocityrightmotor0 simsetIntegerSignalarrive21 simwaitForSignalfinish2 simclearIntegerSignalfinish2逐句分析
sim.setIntegerSignal('occupy2',1): 设置名为'occupy2'的整数信号为1。
sim.setJointTargetVelocity(leftmotor,0): 设置左侧电机的目标速度为0。
sim.setJointTargetVelocity(rightmotor,0): 设置右侧电机的目标速度为0。
sim.setIntegerSignal('arrive2',1): 设置名为'arrive2'的整数信号为1。
sim.waitForSignal('finish2'): 等待名为'finish2'的信号。
sim.clearIntegerSignal('finish2'): 清除名为'finish2'的整数信号。
原文地址: https://www.cveoy.top/t/topic/htFX 著作权归作者所有。请勿转载和采集!