mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-14 09:00:53 +00:00
add encoding=utf-8
This commit is contained in:
parent
6684ad6844
commit
e434301c17
9 changed files with 8 additions and 6 deletions
1
mycobot_320/mycobot_320/scripts/mycobot_320_detect_marker.py
Normal file → Executable file
1
mycobot_320/mycobot_320/scripts/mycobot_320_detect_marker.py
Normal file → Executable file
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# -*- coding:utf-8 -*-
|
||||||
import rospy
|
import rospy
|
||||||
import cv2 as cv
|
import cv2 as cv
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
|
||||||
2
mycobot_320/mycobot_320/scripts/mycobot_320_follow_and_pump.py
Normal file → Executable file
2
mycobot_320/mycobot_320/scripts/mycobot_320_follow_and_pump.py
Normal file → Executable file
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
# coding:utf-8
|
# -*- coding:utf-8 -*-
|
||||||
import rospy
|
import rospy
|
||||||
from visualization_msgs.msg import Marker
|
from visualization_msgs.msg import Marker
|
||||||
import time
|
import time
|
||||||
|
|
|
||||||
5
mycobot_320/mycobot_320/scripts/mycobot_320_follow_display.py
Normal file → Executable file
5
mycobot_320/mycobot_320/scripts/mycobot_320_follow_display.py
Normal file → Executable file
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
|
# -*- coding:utf-8 -*-
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import rospy
|
import rospy
|
||||||
|
|
@ -70,7 +71,6 @@ def talker():
|
||||||
pub.publish(joint_state_send)
|
pub.publish(joint_state_send)
|
||||||
|
|
||||||
coords = mycobot.get_coords()
|
coords = mycobot.get_coords()
|
||||||
|
|
||||||
# marker
|
# marker
|
||||||
marker_.header.stamp = rospy.Time.now()
|
marker_.header.stamp = rospy.Time.now()
|
||||||
marker_.type = marker_.SPHERE
|
marker_.type = marker_.SPHERE
|
||||||
|
|
@ -80,7 +80,6 @@ def talker():
|
||||||
marker_.scale.z = 0.04
|
marker_.scale.z = 0.04
|
||||||
|
|
||||||
# marker position initial
|
# marker position initial
|
||||||
# print(coords)
|
|
||||||
if not coords:
|
if not coords:
|
||||||
coords = [0, 0, 0, 0, 0, 0]
|
coords = [0, 0, 0, 0, 0, 0]
|
||||||
rospy.loginfo("error [101]: can not get coord values")
|
rospy.loginfo("error [101]: can not get coord values")
|
||||||
|
|
@ -92,10 +91,8 @@ def talker():
|
||||||
marker_.color.a = 1.0
|
marker_.color.a = 1.0
|
||||||
marker_.color.g = 1.0
|
marker_.color.g = 1.0
|
||||||
pub_marker.publish(marker_)
|
pub_marker.publish(marker_)
|
||||||
|
|
||||||
rate.sleep()
|
rate.sleep()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
talker()
|
talker()
|
||||||
|
|
|
||||||
1
mycobot_320/mycobot_320/scripts/mycobot_320_following_marker.py
Normal file → Executable file
1
mycobot_320/mycobot_320/scripts/mycobot_320_following_marker.py
Normal file → Executable file
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
|
# -*- coding:utf-8 -*-
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import rospy
|
import rospy
|
||||||
|
|
|
||||||
1
mycobot_320/mycobot_320/scripts/mycobot_320_listen_real.py
Normal file → Executable file
1
mycobot_320/mycobot_320/scripts/mycobot_320_listen_real.py
Normal file → Executable file
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
|
# -*- coding:utf-8 -*-
|
||||||
# license removed for brevity
|
# license removed for brevity
|
||||||
import time
|
import time
|
||||||
import math
|
import math
|
||||||
|
|
|
||||||
1
mycobot_320/mycobot_320/scripts/mycobot_320_listen_real_of_topic.py
Normal file → Executable file
1
mycobot_320/mycobot_320/scripts/mycobot_320_listen_real_of_topic.py
Normal file → Executable file
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
|
# -*- coding:utf-8 -*-
|
||||||
import math
|
import math
|
||||||
|
|
||||||
import rospy
|
import rospy
|
||||||
|
|
|
||||||
0
mycobot_320/mycobot_320/scripts/mycobot_320_simple_gui.py
Normal file → Executable file
0
mycobot_320/mycobot_320/scripts/mycobot_320_simple_gui.py
Normal file → Executable file
2
mycobot_320/mycobot_320/scripts/mycobot_320_slider.py
Normal file → Executable file
2
mycobot_320/mycobot_320/scripts/mycobot_320_slider.py
Normal file → Executable file
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
|
# -*- coding:utf-8 -*-
|
||||||
"""[summary]
|
"""[summary]
|
||||||
This file obtains the joint angle of the manipulator in ROS,
|
This file obtains the joint angle of the manipulator in ROS,
|
||||||
and then sends it directly to the real manipulator using `pymycobot` API.
|
and then sends it directly to the real manipulator using `pymycobot` API.
|
||||||
|
|
|
||||||
1
mycobot_320/mycobot_320/scripts/mycobot_320_teleop_keyboard.py
Normal file → Executable file
1
mycobot_320/mycobot_320/scripts/mycobot_320_teleop_keyboard.py
Normal file → Executable file
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# -*- coding:utf-8 -*-
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from mycobot_communication.srv import GetCoords, SetCoords, GetAngles, SetAngles, GripperStatus
|
from mycobot_communication.srv import GetCoords, SetCoords, GetAngles, SetAngles, GripperStatus
|
||||||
import rospy
|
import rospy
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue