From 41a9ebf1db924b2638fbb8f4165896e5f305abb0 Mon Sep 17 00:00:00 2001 From: wangWking <842749351@qq.com> Date: Thu, 21 Nov 2024 13:40:44 +0800 Subject: [PATCH] update pro600/630 code --- mycobot_pro/mycobot_600/scripts/slider_600.py | 3 ++- mycobot_pro/mycobot_600_moveit/scripts/sync_plan.py | 3 ++- mycobot_pro/mycobot_630/scripts/mycobot_630_slider.py | 3 ++- mycobot_pro/mycobot_630/scripts/test.py | 2 +- mycobot_pro/mycobot_630_moveit/scripts/sync_plan.py | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mycobot_pro/mycobot_600/scripts/slider_600.py b/mycobot_pro/mycobot_600/scripts/slider_600.py index e9319887..c8fd3abe 100755 --- a/mycobot_pro/mycobot_600/scripts/slider_600.py +++ b/mycobot_pro/mycobot_600/scripts/slider_600.py @@ -35,7 +35,8 @@ def listener(): mc = ElephantRobot(ip, int(port)) # START CLIENT,启动客户端 res = mc.start_client() - if res != "": + if not res: + print('res:', res) sys.exit(1) mc.set_speed(90) diff --git a/mycobot_pro/mycobot_600_moveit/scripts/sync_plan.py b/mycobot_pro/mycobot_600_moveit/scripts/sync_plan.py index 3f068770..81c3abb6 100755 --- a/mycobot_pro/mycobot_600_moveit/scripts/sync_plan.py +++ b/mycobot_pro/mycobot_600_moveit/scripts/sync_plan.py @@ -37,7 +37,8 @@ def listener(): mc = ElephantRobot(ip, int(port)) # START CLIENT,启动客户端 res = mc.start_client() - if res != "": + if not res: + print('res:', res) sys.exit(1) mc.set_speed(90) diff --git a/mycobot_pro/mycobot_630/scripts/mycobot_630_slider.py b/mycobot_pro/mycobot_630/scripts/mycobot_630_slider.py index 8b4cd013..62ed79bb 100755 --- a/mycobot_pro/mycobot_630/scripts/mycobot_630_slider.py +++ b/mycobot_pro/mycobot_630/scripts/mycobot_630_slider.py @@ -35,7 +35,8 @@ def listener(): mc = ElephantRobot(ip, int(port)) # START CLIENT,启动客户端 res = mc.start_client() - if res != "": + if not res: + print('res:', res) sys.exit(1) mc.set_speed(90) diff --git a/mycobot_pro/mycobot_630/scripts/test.py b/mycobot_pro/mycobot_630/scripts/test.py index 5c16e3ee..dace17d9 100644 --- a/mycobot_pro/mycobot_630/scripts/test.py +++ b/mycobot_pro/mycobot_630/scripts/test.py @@ -5,7 +5,7 @@ mc = ElephantRobot('192.168.1.159', 5001, debug=True) res = mc.start_client() -if res != "": +if not res : print('quit') sys.exit(1) diff --git a/mycobot_pro/mycobot_630_moveit/scripts/sync_plan.py b/mycobot_pro/mycobot_630_moveit/scripts/sync_plan.py index 2b918e7c..661f825a 100755 --- a/mycobot_pro/mycobot_630_moveit/scripts/sync_plan.py +++ b/mycobot_pro/mycobot_630_moveit/scripts/sync_plan.py @@ -37,7 +37,8 @@ def listener(): mc = ElephantRobot(ip, int(port)) # START CLIENT,启动客户端 res = mc.start_client() - if res != "": + if not res: + print('res:', res) sys.exit(1) mc.set_speed(90)