This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testing_data = [[26, 2.89], [22, 2.76], [18, 2.79], [22, 3.57], [26, 2.83], [11, 3.46], [12, 3.69], [28, 3.49], [20, 3.41], [5, 2.85], [17, 3.31], [16, 3.86], [14, 2.72], [7, 3.0], [17, 3.67], [8, 2.96], [14, 3.9], [10, 3.24], [9, 3.29], [6, 3.29], [22, 2.82], [20, 3.93], [29, 3.14], [9, 2.78], [17, 2.68], [26, 3.96], [16, 2.63], [20, 3.45], [23, 3.2], [29, 2.58], [18, 2.83], [13, 3.6], [21, 3.79], [26, 3.81], [26, 3.44], [10, 3.1], [18, 2.64], [8, 3.37], [9, 2.58], [6, 3.15], [9, 3.2], [10, 2.93], [17, 3.58], [28, 2.83], [21, 2.89], [8, 2.88], [12, 3.39], [12, 3.76], [26, 3.37], [25, 2.86], [9, 3.94], [21, 3.71], [19, 2.82], [18, 3.7], [6, 2.87], [14, 3.36], [24, 3.79], [5, 3.45], [19, 3.03], [7, 3.67], [11, 2.88], [23, 2.85], [29, 3.74], [6, 3.27], [22, 2.91], [29, 3.68], [16, 3.22], [15, 3.18], [16, 2.67], [19, 3.48], [20, 3.28], [14, 2.7], [24, 3.87], [20, 3.89], [5, 2.57], [22, 2.84], [13, 3.77], [13, 2.76], [20, 3.08], [29, 2.62], [5, 2.58], [6, 3.41], [6, 2.9], [8, 3.15], [19, 3.67], [12, 3.25], [7, 2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
react: BROWSER=none npm start | |
electron: node src/electron-wait-react |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod +x catkin_ws/src/my_turtlesim/script/pub.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import rospy # เรียก external library ชื่อ rospy | |
from geometry_msgs.msg import Twist # เรีียก lib Twist จาก package geometry_msgs.msg | |
import time # เรียก lib ชื่อ time | |
vel = Twist() # สร้าง object ชื่อ vel จาก Class Twist | |
# def คือการประกาศฟัังก์ชั่นใน Python | |
def main (): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
รันด้วยคำสั่ง rosrun my_turtlesim pub.py | |
""" | |
import rospy | |
from geometry_msgs.msg import Twist | |
import time | |
vel = Twist() # Variable Twist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import rospy # เรียก Libray จากภายนอก | |
from geometry_msgs.msg import Twist | |
import time | |
vel = Twist() # สร้าง Object สำหรับเปลี่ยนความเร็วหุ่นยนต์ | |
def main (): # ฟังก์ชั่นหลัก | |
rospy.init_node('turtle_commander', anonymous=True) # Regis Node บน Master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import rospy | |
def main (): | |
rospy.init_node('turtle_commander', anonymous=True) | |
rate = rospy.Rate(10) # 10 Hz | |
while not rospy.is_shutdown(): | |
# TODO | |
# END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import rospy | |
from geometry_msgs.msg import Twist | |
import time | |
# Noted | |
# Topic: /turtle1/cmd_vel | |
# Type: geometry_msgs/Twist | |
def main (): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import rospy # เรียก Libray จากภายนอก | |
from geometry_msgs.msg import Twist | |
import time | |
vel = Twist() # สร้าง Object สำหรับเปลี่ยนความเร็วหุ่นยนต์ | |
def main (): # ฟังก์ชั่นหลัก | |
rospy.init_node('turtle_commander', anonymous=False) # Regis Node บน Master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import rospy # เรียก Libray จากภายนอก | |
from geometry_msgs.msg import Twist | |
import time | |
vel = Twist() # สร้าง Object สำหรับเปลี่ยนความเร็วหุ่นยนต์ | |
def main (): # ฟังก์ชั่นหลัก | |
rospy.init_node('turtle_commander', anonymous=False) # Regis Node บน Master |
OlderNewer