From e434301c1700feb24535518ac60a40054b77434c Mon Sep 17 00:00:00 2001 From: wangWking <842749351@qq.com> Date: Thu, 21 Apr 2022 18:03:24 +0800 Subject: [PATCH] add encoding=utf-8 --- mycobot_320/mycobot_320/scripts/mycobot_320_detect_marker.py | 1 + .../mycobot_320/scripts/mycobot_320_follow_and_pump.py | 2 +- .../mycobot_320/scripts/mycobot_320_follow_display.py | 5 +---- .../mycobot_320/scripts/mycobot_320_following_marker.py | 1 + mycobot_320/mycobot_320/scripts/mycobot_320_listen_real.py | 1 + .../mycobot_320/scripts/mycobot_320_listen_real_of_topic.py | 1 + mycobot_320/mycobot_320/scripts/mycobot_320_simple_gui.py | 0 mycobot_320/mycobot_320/scripts/mycobot_320_slider.py | 2 +- .../mycobot_320/scripts/mycobot_320_teleop_keyboard.py | 1 + 9 files changed, 8 insertions(+), 6 deletions(-) mode change 100644 => 100755 mycobot_320/mycobot_320/scripts/mycobot_320_detect_marker.py mode change 100644 => 100755 mycobot_320/mycobot_320/scripts/mycobot_320_follow_and_pump.py mode change 100644 => 100755 mycobot_320/mycobot_320/scripts/mycobot_320_follow_display.py mode change 100644 => 100755 mycobot_320/mycobot_320/scripts/mycobot_320_following_marker.py mode change 100644 => 100755 mycobot_320/mycobot_320/scripts/mycobot_320_listen_real.py mode change 100644 => 100755 mycobot_320/mycobot_320/scripts/mycobot_320_listen_real_of_topic.py mode change 100644 => 100755 mycobot_320/mycobot_320/scripts/mycobot_320_simple_gui.py mode change 100644 => 100755 mycobot_320/mycobot_320/scripts/mycobot_320_slider.py mode change 100644 => 100755 mycobot_320/mycobot_320/scripts/mycobot_320_teleop_keyboard.py diff --git a/mycobot_320/mycobot_320/scripts/mycobot_320_detect_marker.py b/mycobot_320/mycobot_320/scripts/mycobot_320_detect_marker.py old mode 100644 new mode 100755 index 04ca483..42bde89 --- a/mycobot_320/mycobot_320/scripts/mycobot_320_detect_marker.py +++ b/mycobot_320/mycobot_320/scripts/mycobot_320_detect_marker.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding:utf-8 -*- import rospy import cv2 as cv import numpy as np diff --git a/mycobot_320/mycobot_320/scripts/mycobot_320_follow_and_pump.py b/mycobot_320/mycobot_320/scripts/mycobot_320_follow_and_pump.py old mode 100644 new mode 100755 index f26b669..ef07a9b --- a/mycobot_320/mycobot_320/scripts/mycobot_320_follow_and_pump.py +++ b/mycobot_320/mycobot_320/scripts/mycobot_320_follow_and_pump.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# coding:utf-8 +# -*- coding:utf-8 -*- import rospy from visualization_msgs.msg import Marker import time diff --git a/mycobot_320/mycobot_320/scripts/mycobot_320_follow_display.py b/mycobot_320/mycobot_320/scripts/mycobot_320_follow_display.py old mode 100644 new mode 100755 index 9665dc8..52de81a --- a/mycobot_320/mycobot_320/scripts/mycobot_320_follow_display.py +++ b/mycobot_320/mycobot_320/scripts/mycobot_320_follow_display.py @@ -1,4 +1,5 @@ #!/usr/bin/env python2 +# -*- coding:utf-8 -*- import time import rospy @@ -70,7 +71,6 @@ def talker(): pub.publish(joint_state_send) coords = mycobot.get_coords() - # marker marker_.header.stamp = rospy.Time.now() marker_.type = marker_.SPHERE @@ -80,7 +80,6 @@ def talker(): marker_.scale.z = 0.04 # marker position initial - # print(coords) if not coords: coords = [0, 0, 0, 0, 0, 0] rospy.loginfo("error [101]: can not get coord values") @@ -92,10 +91,8 @@ def talker(): marker_.color.a = 1.0 marker_.color.g = 1.0 pub_marker.publish(marker_) - rate.sleep() - if __name__ == "__main__": try: talker() diff --git a/mycobot_320/mycobot_320/scripts/mycobot_320_following_marker.py b/mycobot_320/mycobot_320/scripts/mycobot_320_following_marker.py old mode 100644 new mode 100755 index 4afe3f9..6de2427 --- a/mycobot_320/mycobot_320/scripts/mycobot_320_following_marker.py +++ b/mycobot_320/mycobot_320/scripts/mycobot_320_following_marker.py @@ -1,4 +1,5 @@ #!/usr/bin/env python2 +# -*- coding:utf-8 -*- import time import rospy diff --git a/mycobot_320/mycobot_320/scripts/mycobot_320_listen_real.py b/mycobot_320/mycobot_320/scripts/mycobot_320_listen_real.py old mode 100644 new mode 100755 index d022c72..1ec7872 --- a/mycobot_320/mycobot_320/scripts/mycobot_320_listen_real.py +++ b/mycobot_320/mycobot_320/scripts/mycobot_320_listen_real.py @@ -1,4 +1,5 @@ #!/usr/bin/env python2 +# -*- coding:utf-8 -*- # license removed for brevity import time import math diff --git a/mycobot_320/mycobot_320/scripts/mycobot_320_listen_real_of_topic.py b/mycobot_320/mycobot_320/scripts/mycobot_320_listen_real_of_topic.py old mode 100644 new mode 100755 index 169567a..5e7ffa6 --- a/mycobot_320/mycobot_320/scripts/mycobot_320_listen_real_of_topic.py +++ b/mycobot_320/mycobot_320/scripts/mycobot_320_listen_real_of_topic.py @@ -1,4 +1,5 @@ #!/usr/bin/env python2 +# -*- coding:utf-8 -*- import math import rospy diff --git a/mycobot_320/mycobot_320/scripts/mycobot_320_simple_gui.py b/mycobot_320/mycobot_320/scripts/mycobot_320_simple_gui.py old mode 100644 new mode 100755 diff --git a/mycobot_320/mycobot_320/scripts/mycobot_320_slider.py b/mycobot_320/mycobot_320/scripts/mycobot_320_slider.py old mode 100644 new mode 100755 index 6491795..13bda4b --- a/mycobot_320/mycobot_320/scripts/mycobot_320_slider.py +++ b/mycobot_320/mycobot_320/scripts/mycobot_320_slider.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 - +# -*- coding:utf-8 -*- """[summary] This file obtains the joint angle of the manipulator in ROS, and then sends it directly to the real manipulator using `pymycobot` API. diff --git a/mycobot_320/mycobot_320/scripts/mycobot_320_teleop_keyboard.py b/mycobot_320/mycobot_320/scripts/mycobot_320_teleop_keyboard.py old mode 100644 new mode 100755 index 77d7d13..134d649 --- a/mycobot_320/mycobot_320/scripts/mycobot_320_teleop_keyboard.py +++ b/mycobot_320/mycobot_320/scripts/mycobot_320_teleop_keyboard.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding:utf-8 -*- from __future__ import print_function from mycobot_communication.srv import GetCoords, SetCoords, GetAngles, SetAngles, GripperStatus import rospy