This commit is contained in:
LiangShiyun 2025-05-30 13:47:56 +08:00
parent cde3cdb5f6
commit 51836da316
3 changed files with 8 additions and 5 deletions

View File

@ -1591,7 +1591,7 @@ if __name__ == "__main__":
# ] ## 单位 m deg
# myInterpolate = TrajectoryInterpolator(waypoints)
# ts = np.linspace(0,5,100)
robot = MassageRobot(arm_config_path="/home/jsfb/jsfb/MassageRobot_Dobot/Massage/MassageControl/config/robot_config.yaml")
robot = MassageRobot(arm_config_path="/home/jsfb/jsfb_ws/MassageRobot_Dobot/Massage/MassageControl/config/robot_config.yaml")
# xr_list, vr_list, ar_list = [], [], []
# for t in ts:
# xr, vr, ar = myInterpolate.interpolate(t)

View File

@ -119,7 +119,9 @@ class dobot_nova5:
self.dashboard.EmergencyStop(mode=0) # 松开急停
self.clearError() # 清除报警
# 关闭碰撞检测
self.dashboard.SetCollisionLevel(level=0)
self.dashboard.SetCollisionLevel(level=1)
# lower the velocity
self.dashboard.SpeedFactor(50)
if self.parseResultId(self.dashboard.EnableRobot())[0] != 0:
print("使能失败:检查29999端口是否被占用")
return
@ -871,8 +873,8 @@ if __name__ == "__main__":
dobot = dobot_nova5("192.168.5.1")
dobot.start()
# posJ_home = [-45,87,-147,0,90,-90]
posJ_ready = [-45,55.5785,-120.6882,5.111,90,-90]
dobot.RunPoint_P_inJoint(posJ_ready)
# posJ_ready = [-45,55.5785,-120.6882,5.111,90,-90]
# dobot.RunPoint_P_inJoint(posJ_ready)
# # sleep(1)
dobot.chooseRightFrame()

View File

@ -16,7 +16,8 @@ sys.path.append(os.path.abspath(os.path.join(os.getcwd(), "Massage/MassageContro
class XjcSensor:
def __init__(self, port=None, baudrate=115200, rate=250):
self.port = '/dev/ttyUSB0'
# self.port = '/dev/ttyUSB0'
self.port = '/dev/ttyS0'
self.baudrate = baudrate
self.rate = rate