add encoding=utf-8

This commit is contained in:
wangWking 2022-04-21 18:03:24 +08:00
parent 6684ad6844
commit e434301c17
9 changed files with 8 additions and 6 deletions

View file

@ -1,4 +1,5 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import rospy
import cv2 as cv
import numpy as np

View file

@ -1,5 +1,5 @@
#!/usr/bin/env python2
# coding:utf-8
# -*- coding:utf-8 -*-
import rospy
from visualization_msgs.msg import Marker
import time

View file

@ -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()

View file

@ -1,4 +1,5 @@
#!/usr/bin/env python2
# -*- coding:utf-8 -*-
import time
import rospy

View file

@ -1,4 +1,5 @@
#!/usr/bin/env python2
# -*- coding:utf-8 -*-
# license removed for brevity
import time
import math

View file

@ -1,4 +1,5 @@
#!/usr/bin/env python2
# -*- coding:utf-8 -*-
import math
import rospy

View file

2
mycobot_320/mycobot_320/scripts/mycobot_320_slider.py Normal file → Executable file
View file

@ -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.

View file

@ -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