diff --git a/mycobot_ai/ai_mycobot_280/scripts/combine_detect_obj_img_folder_opt.py b/mycobot_ai/ai_mycobot_280/scripts/combine_detect_obj_img_folder_opt.py index 91913a3..bfd6025 100644 --- a/mycobot_ai/ai_mycobot_280/scripts/combine_detect_obj_img_folder_opt.py +++ b/mycobot_ai/ai_mycobot_280/scripts/combine_detect_obj_img_folder_opt.py @@ -425,12 +425,16 @@ class Object_detect(Movement): # The path to save the image folder def parse_folder(folder): restore = [] - path1 = '/home/ubuntu/catkin_ws/src/mycobot_ros/mycobot_ai/ai_mycobot_280' + folder + path = '' + path1 = '/home/ubuntu/catkin_ws/src/mycobot_ros/mycobot_ai/ai_mycobot_280/' + folder path2 = '/home/h/catkin_ws/src/mycobot_ros/mycobot_ai/ai_mycobot_280/' + folder if os.path.exists(path1): path = path1 elif os.path.exists(path2): path = path2 + + print("path:",path) + for i, j, k in os.walk(path): for l in k: restore.append(cv2.imread(folder + '/{}'.format(l))) diff --git a/mycobot_ai/ai_mycobot_280/scripts/scripts.tar.gz b/mycobot_ai/ai_mycobot_280/scripts/scripts.tar.gz deleted file mode 100644 index 5e01d6b..0000000 Binary files a/mycobot_ai/ai_mycobot_280/scripts/scripts.tar.gz and /dev/null differ diff --git a/mycobot_ai/ai_mycobot_280/scripts/test.py b/mycobot_ai/ai_mycobot_280/scripts/test.py index 79e8a70..087c937 100755 --- a/mycobot_ai/ai_mycobot_280/scripts/test.py +++ b/mycobot_ai/ai_mycobot_280/scripts/test.py @@ -5,13 +5,13 @@ from pymycobot import PI_PORT, PI_BAUD # 当使用树莓派版本的mycobot时 import time # mc = MyCobot("/dev/ttyACM0", 115200) -mc = MyCobot("/dev/ttyUSB0", 115200) -# mc = MyCobot("/dev/ttyAMA0", 1000000) +# mc = MyCobot("/dev/ttyUSB0", 115200) +mc = MyCobot("/dev/ttyAMA0", 1000000) -# mc.send_angles([0,0,0,0,0,0], 25) +mc.send_angles([0,0,0,0,0,0], 25) # print(mc.get_angles()) -mc.send_angles([-7.11, -6.94, -55.01, -24.16, 0.0, -15], 30) -time.sleep(4) +# mc.send_angles([-7.11, -6.94, -55.01, -24.16, 0.0, -15], 30) +# time.sleep(4) # print(mc.get_angles()) # mc.send_coords([120.8, -134.4, 258.0, -172.72, -5.31, -109.09], 30, 1) # red bucket @@ -35,6 +35,8 @@ time.sleep(4) # mc.release_all_servos() +# mc.release_servo(1) +# mc.set_servo_calibration(1) # time.sleep(1) # while True: # print("angles:%s"% mc.get_angles()) diff --git a/mycobot_communication/scripts/mycobot_topics_pi.py b/mycobot_communication/scripts/mycobot_topics_pi.py index ae09c88..f40ef07 100755 --- a/mycobot_communication/scripts/mycobot_topics_pi.py +++ b/mycobot_communication/scripts/mycobot_topics_pi.py @@ -74,7 +74,7 @@ class MycobotTopics(object): rospy.init_node("mycobot_topics_pi") rospy.loginfo("start ...") # problem - port = rospy.get_param("~port", os.popen("ls /dev/ttyAMA*").readline()[:-1]") + port = rospy.get_param("~port", os.popen("ls /dev/ttyAMA*").readline()[:-1]) baud = rospy.get_param("~baud", 1000000) rospy.loginfo("%s,%s" % (port, baud)) self.mc = MyCobotSocket(port, baud) # port