diff --git a/Massage/MassageControl/MassageRobot_nova5.py b/Massage/MassageControl/MassageRobot_nova5.py index b87518d..7967350 100644 --- a/Massage/MassageControl/MassageRobot_nova5.py +++ b/Massage/MassageControl/MassageRobot_nova5.py @@ -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) diff --git a/Massage/MassageControl/hardware/dobot_nova5.py b/Massage/MassageControl/hardware/dobot_nova5.py index 128f801..7fcc6b5 100644 --- a/Massage/MassageControl/hardware/dobot_nova5.py +++ b/Massage/MassageControl/hardware/dobot_nova5.py @@ -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() diff --git a/Massage/MassageControl/hardware/force_sensor.py b/Massage/MassageControl/hardware/force_sensor.py index cc9eda0..fdaef4a 100644 --- a/Massage/MassageControl/hardware/force_sensor.py +++ b/Massage/MassageControl/hardware/force_sensor.py @@ -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