Skip to content

Commit 60eb339

Browse files
committed
renamed 280 MUSE PI to 280 RISC V
1 parent 618ec84 commit 60eb339

12 files changed

+47
-42
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

libraries/pyqtFile/AiKit_auto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ def retranslateUi(self, AiKit_UI):
938938
self.comboBox_device.setItemText(0, _translate("AiKit_UI", "myCobot 280 for Pi"))
939939
self.comboBox_device.setItemText(1, _translate("AiKit_UI", "myCobot 280 for JN"))
940940
self.comboBox_device.setItemText(2, _translate("AiKit_UI", "myCobot 280 for M5"))
941-
self.comboBox_device.setItemText(3, _translate("AiKit_UI", "myCobot 280 for MUSE Pi"))
941+
self.comboBox_device.setItemText(3, _translate("AiKit_UI", "myCobot 280 for RISC V"))
942942
self.comboBox_device.setItemText(4, _translate("AiKit_UI", "myPalletizer 260 for M5"))
943943
self.comboBox_device.setItemText(5, _translate("AiKit_UI", "mechArm 270 for Pi"))
944944
self.comboBox_device.setItemText(6, _translate("AiKit_UI", "ultraArm P340"))

libraries/pyqtFile/AiKit_auto.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ border-style: outset;</string>
492492
</item>
493493
<item>
494494
<property name="text">
495-
<string>myCobot 280 for MUSE Pi</string>
495+
<string>myCobot 280 for RISC V</string>
496496
</property>
497497
</item>
498498
<item>

main-musepi-opencv4.10.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _init_variable(self):
100100
self.M5 = ['myPalletizer 260 for M5', 'myCobot 280 for M5', 'ultraArm P340', 'mechArm 270 for M5'] # M5 robot
101101
self.Pi = ['myCobot 280 for Pi', 'mechArm 270 for Pi', 'myCobot 280 for JN',
102102
'myPalletizer 260 for Pi'] # Pi robot
103-
self.MUSE_Pi = ['myCobot 280 for MUSE Pi']
103+
self.RISC_V = ['myCobot 280 for RISC V']
104104

105105
# angles to move
106106
self.move_angles = [
@@ -422,10 +422,12 @@ def buad_choose(self):
422422
"""Switch the baud rate according to the device and initialize the corresponding variable"""
423423
# self.btn_status(True)
424424
value = self.comboBox_device.currentText()
425-
if value in self.Pi or self.MUSE_Pi:
425+
if value in self.Pi:
426426
# self.comboBox_buad.clear()
427427
# self.comboBox_buad.addItem('1000000')
428428
self.comboBox_buad.setCurrentIndex(0)
429+
elif value in self.RISC_V:
430+
self.comboBox_buad.setCurrentIndex(0)
429431
else:
430432
# self.comboBox_buad.clear()
431433
# self.comboBox_buad.addItem('115200')
@@ -439,7 +441,7 @@ def buad_choose(self):
439441
else:
440442
self.widget_11.show()
441443
self.widget_20.show()
442-
if value in ['myCobot 280 for MUSE Pi']:
444+
if value in ['myCobot 280 for RISC V']:
443445
self.camera_edit.setText('20')
444446
else:
445447
self.camera_edit.setText('0')
@@ -450,7 +452,7 @@ def buad_choose(self):
450452
def device_coord(self):
451453
"""Get points according to the device"""
452454
value = self.comboBox_device.currentText()
453-
if value in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for MUSE Pi']:
455+
if value in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for RISC V']:
454456
# yolov5 model file path
455457
self.modelWeights = libraries_path + "/yolov5File/yolov5s.onnx"
456458
# y-axis offset
@@ -1846,7 +1848,7 @@ def decide_move(self, x, y, color):
18461848
elif device == 'ultraArm P340':
18471849
_moved = threading.Thread(target=self.moved(x + 50, y + 60))
18481850
_moved.start()
1849-
elif device == 'myCobot 280 for MUSE Pi':
1851+
elif device == 'myCobot 280 for RISC V':
18501852
_moved = threading.Thread(target=self.moved(x - 5, y + 145))
18511853
_moved.start()
18521854
else:
@@ -1944,7 +1946,7 @@ def moved(self, x, y):
19441946
[self.home_coords[0] + x, self.home_coords[1] - y, self.camera_z, 0], 50)
19451947
time.sleep(3)
19461948

1947-
elif device == 'myCobot 280 for MUSE Pi':
1949+
elif device == 'myCobot 280 for RISC V':
19481950
self.myCobot.send_coords(
19491951
[self.home_coords[0] + x, self.home_coords[1] + y, self.camera_z, 178.99, -3.78,
19501952
-62.9], 25, 1)
@@ -1988,7 +1990,7 @@ def moved(self, x, y):
19881990
self.myCobot.set_coords([x, -y, self.camera_z, 0], 50)
19891991
time.sleep(2)
19901992

1991-
elif device in ['myCobot 280 for MUSE Pi']:
1993+
elif device in ['myCobot 280 for RISC V']:
19921994
self.myCobot.send_coords([x, y, self.camera_z, 179.87, -3.78, -62.75], 25, 1)
19931995
self.check_position([x, y, self.camera_z, 179.87, -3.78, -62.75], 1)
19941996

@@ -2021,7 +2023,7 @@ def moved(self, x, y):
20212023
self.myCobot.set_coords([x, -y, self.camera_z, 0], 50)
20222024
time.sleep(2)
20232025

2024-
elif device in ['myCobot 280 for MUSE Pi']:
2026+
elif device in ['myCobot 280 for RISC V']:
20252027
self.myCobot.send_coords([x, y, self.camera_z, 179.87, -3.78, -62.75], 25, 1)
20262028
self.check_position([x, y, self.camera_z, 179.87, -3.78, -62.75], 1)
20272029

@@ -2054,7 +2056,7 @@ def moved(self, x, y):
20542056
# self.stop_wait(3)
20552057
self.check_position([tmp[0], 5.39, -83.49, -10.37, -0.08, tmp[5]], 0)
20562058

2057-
elif device in ['myCobot 280 for MUSE Pi']:
2059+
elif device in ['myCobot 280 for RISC V']:
20582060
self.myCobot.send_angles([tmp[0], -0.71, -74.49, -23.02, -0.79, tmp[5]], 25)
20592061
self.check_position([tmp[0], -0.71, -74.49, -23.02, -0.79, tmp[5]], 0)
20602062

@@ -2079,7 +2081,7 @@ def moved(self, x, y):
20792081
self.myCobot.set_coords(self.move_coords[color], 40)
20802082
self.stop_wait(4)
20812083

2082-
elif device in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for MUSE Pi']:
2084+
elif device in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for RISC V']:
20832085
self.myCobot.send_angles(self.new_move_coords_to_angles[color], 25)
20842086
self.check_position(self.new_move_coords_to_angles[color], 0)
20852087
else:
@@ -2115,7 +2117,7 @@ def pump_on(self):
21152117
else:
21162118
self.myCobot.set_basic_output(5, 0)
21172119
time.sleep(0.05)
2118-
elif self.comboBox_device.currentText() in self.MUSE_Pi:
2120+
elif self.comboBox_device.currentText() in self.RISC_V:
21192121
from gpiozero.pins.lgpio import LGPIOFactory
21202122
from gpiozero import Device, LED
21212123
Device.pin_factory = LGPIOFactory(chip=0) # 显式指定/dev/gpiochip0
@@ -2152,7 +2154,7 @@ def pump_off(self):
21522154
time.sleep(1)
21532155
self.myCobot.set_basic_output(2, 1)
21542156
time.sleep(0.05)
2155-
elif self.comboBox_device.currentText() in self.MUSE_Pi:
2157+
elif self.comboBox_device.currentText() in self.RISC_V:
21562158
from gpiozero.pins.lgpio import LGPIOFactory
21572159
from gpiozero import Device, LED
21582160
Device.pin_factory = LGPIOFactory(chip=0) # 显式指定/dev/gpiochip0

main-musepi-opencv4.6.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _init_variable(self):
100100
self.M5 = ['myPalletizer 260 for M5', 'myCobot 280 for M5', 'ultraArm P340', 'mechArm 270 for M5'] # M5 robot
101101
self.Pi = ['myCobot 280 for Pi', 'mechArm 270 for Pi', 'myCobot 280 for JN',
102102
'myPalletizer 260 for Pi'] # Pi robot
103-
self.MUSE_Pi = ['myCobot 280 for MUSE Pi']
103+
self.RISC_V = ['myCobot 280 for RISC V']
104104

105105
# angles to move
106106
self.move_angles = [
@@ -419,10 +419,12 @@ def buad_choose(self):
419419
"""Switch the baud rate according to the device and initialize the corresponding variable"""
420420
# self.btn_status(True)
421421
value = self.comboBox_device.currentText()
422-
if value in self.Pi or self.MUSE_Pi:
422+
if value in self.Pi:
423423
# self.comboBox_buad.clear()
424424
# self.comboBox_buad.addItem('1000000')
425425
self.comboBox_buad.setCurrentIndex(0)
426+
elif value in self.RISC_V:
427+
self.comboBox_buad.setCurrentIndex(0)
426428
else:
427429
# self.comboBox_buad.clear()
428430
# self.comboBox_buad.addItem('115200')
@@ -436,7 +438,7 @@ def buad_choose(self):
436438
else:
437439
self.widget_11.show()
438440
self.widget_20.show()
439-
if value in ['myCobot 280 for MUSE Pi']:
441+
if value in ['myCobot 280 for RISC V']:
440442
self.camera_edit.setText('20')
441443
else:
442444
self.camera_edit.setText('0')
@@ -448,7 +450,7 @@ def buad_choose(self):
448450
def device_coord(self):
449451
"""Get points according to the device"""
450452
value = self.comboBox_device.currentText()
451-
if value in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for MUSE Pi']:
453+
if value in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for RISC V']:
452454
# yolov5 model file path
453455
self.modelWeights = libraries_path + "/yolov5File/yolov5s.onnx"
454456
# y-axis offset
@@ -1822,7 +1824,7 @@ def decide_move(self, x, y, color):
18221824
elif device == 'ultraArm P340':
18231825
_moved = threading.Thread(target=self.moved(x + 50, y + 60))
18241826
_moved.start()
1825-
elif device == 'myCobot 280 for MUSE Pi':
1827+
elif device == 'myCobot 280 for RISC V':
18261828
_moved = threading.Thread(target=self.moved(x - 5, y + 145))
18271829
_moved.start()
18281830
else:
@@ -1920,7 +1922,7 @@ def moved(self, x, y):
19201922
[self.home_coords[0] + x, self.home_coords[1] - y, self.camera_z, 0], 50)
19211923
time.sleep(3)
19221924

1923-
elif device == 'myCobot 280 for MUSE Pi':
1925+
elif device == 'myCobot 280 for RISC V':
19241926
self.myCobot.send_coords(
19251927
[self.home_coords[0] + x, self.home_coords[1] + y, self.camera_z, 178.99, -3.78,
19261928
-62.9], 25, 1)
@@ -1964,7 +1966,7 @@ def moved(self, x, y):
19641966
self.myCobot.set_coords([x, -y, self.camera_z, 0], 50)
19651967
time.sleep(2)
19661968

1967-
elif device in ['myCobot 280 for MUSE Pi']:
1969+
elif device in ['myCobot 280 for RISC V']:
19681970
self.myCobot.send_coords([x, y, self.camera_z, 179.87, -3.78, -62.75], 25, 1)
19691971
self.check_position([x, y, self.camera_z, 179.87, -3.78, -62.75], 1)
19701972

@@ -1997,7 +1999,7 @@ def moved(self, x, y):
19971999
self.myCobot.set_coords([x, -y, self.camera_z, 0], 50)
19982000
time.sleep(2)
19992001

2000-
elif device in ['myCobot 280 for MUSE Pi']:
2002+
elif device in ['myCobot 280 for RISC V']:
20012003
self.myCobot.send_coords([x, y, self.camera_z, 179.87, -3.78, -62.75], 25, 1)
20022004
self.check_position([x, y, self.camera_z, 179.87, -3.78, -62.75], 1)
20032005

@@ -2030,7 +2032,7 @@ def moved(self, x, y):
20302032
# self.stop_wait(3)
20312033
self.check_position([tmp[0], 5.39, -83.49, -10.37, -0.08, tmp[5]], 0)
20322034

2033-
elif device in ['myCobot 280 for MUSE Pi']:
2035+
elif device in ['myCobot 280 for RISC V']:
20342036
self.myCobot.send_angles([tmp[0], -0.71, -74.49, -23.02, -0.79, tmp[5]], 25)
20352037
self.check_position([tmp[0], -0.71, -74.49, -23.02, -0.79, tmp[5]], 0)
20362038

@@ -2055,7 +2057,7 @@ def moved(self, x, y):
20552057
self.myCobot.set_coords(self.move_coords[color], 40)
20562058
self.stop_wait(4)
20572059

2058-
elif device in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for MUSE Pi']:
2060+
elif device in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for RISC V']:
20592061
self.myCobot.send_angles(self.new_move_coords_to_angles[color], 25)
20602062
self.check_position(self.new_move_coords_to_angles[color], 0)
20612063
else:
@@ -2091,7 +2093,7 @@ def pump_on(self):
20912093
else:
20922094
self.myCobot.set_basic_output(5, 0)
20932095
time.sleep(0.05)
2094-
elif self.comboBox_device.currentText() in self.MUSE_Pi:
2096+
elif self.comboBox_device.currentText() in self.RISC_V:
20952097
from gpiozero.pins.lgpio import LGPIOFactory
20962098
from gpiozero import Device, LED
20972099
Device.pin_factory = LGPIOFactory(chip=0) # 显式指定/dev/gpiochip0
@@ -2129,7 +2131,7 @@ def pump_off(self):
21292131
self.myCobot.set_basic_output(2, 1)
21302132
time.sleep(0.05)
21312133

2132-
elif self.comboBox_device.currentText() in self.MUSE_Pi:
2134+
elif self.comboBox_device.currentText() in self.RISC_V:
21332135
from gpiozero.pins.lgpio import LGPIOFactory
21342136
from gpiozero import Device, LED
21352137
Device.pin_factory = LGPIOFactory(chip=0) # 显式指定/dev/gpiochip0

main.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ def _init_variable(self):
9898
self.pump_x = 0
9999
# device
100100
self.M5 = ['myPalletizer 260 for M5', 'myCobot 280 for M5', 'ultraArm P340', 'mechArm 270 for M5'] # M5 robot
101-
self.Pi = ['myCobot 280 for Pi', 'mechArm 270 for Pi', 'myCobot 280 for JN',
102-
'myPalletizer 260 for Pi'] # Pi robot
103-
self.MUSE_Pi = ['myCobot 280 for MUSE Pi']
101+
self.Pi = ['myCobot 280 for Pi', 'mechArm 270 for Pi', 'myCobot 280 for JN', 'myPalletizer 260 for Pi'] # Pi robot
102+
self.RISC_V = ['myCobot 280 for RISC V']
104103

105104
# angles to move
106105
self.move_angles = [
@@ -419,10 +418,12 @@ def buad_choose(self):
419418
"""Switch the baud rate according to the device and initialize the corresponding variable"""
420419
# self.btn_status(True)
421420
value = self.comboBox_device.currentText()
422-
if value in self.Pi or self.MUSE_Pi:
421+
if value in self.Pi:
423422
# self.comboBox_buad.clear()
424423
# self.comboBox_buad.addItem('1000000')
425424
self.comboBox_buad.setCurrentIndex(0)
425+
elif value in self.RISC_V:
426+
self.comboBox_buad.setCurrentIndex(0)
426427
else:
427428
# self.comboBox_buad.clear()
428429
# self.comboBox_buad.addItem('115200')
@@ -436,7 +437,7 @@ def buad_choose(self):
436437
else:
437438
self.widget_11.show()
438439
self.widget_20.show()
439-
if value in ['myCobot 280 for MUSE Pi']:
440+
if value in ['myCobot 280 for RISC V']:
440441
self.camera_edit.setText('20')
441442
else:
442443
self.camera_edit.setText('0')
@@ -448,7 +449,7 @@ def buad_choose(self):
448449
def device_coord(self):
449450
"""Get points according to the device"""
450451
value = self.comboBox_device.currentText()
451-
if value in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for MUSE Pi']:
452+
if value in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for RISC V']:
452453
# yolov5 model file path
453454
self.modelWeights = libraries_path + "/yolov5File/yolov5s.onnx"
454455
# y-axis offset
@@ -1822,7 +1823,7 @@ def decide_move(self, x, y, color):
18221823
elif device == 'ultraArm P340':
18231824
_moved = threading.Thread(target=self.moved(x + 50, y + 60))
18241825
_moved.start()
1825-
elif device == 'myCobot 280 for MUSE Pi':
1826+
elif device == 'myCobot 280 for RISC V':
18261827
_moved = threading.Thread(target=self.moved(x - 5, y + 145))
18271828
_moved.start()
18281829
else:
@@ -1920,7 +1921,7 @@ def moved(self, x, y):
19201921
[self.home_coords[0] + x, self.home_coords[1] - y, self.camera_z, 0], 50)
19211922
time.sleep(3)
19221923

1923-
elif device == 'myCobot 280 for MUSE Pi':
1924+
elif device == 'myCobot 280 for RISC V':
19241925
self.myCobot.send_coords(
19251926
[self.home_coords[0] + x, self.home_coords[1] + y, self.camera_z, 178.99, -3.78,
19261927
-62.9], 25, 1)
@@ -1964,7 +1965,7 @@ def moved(self, x, y):
19641965
self.myCobot.set_coords([x, -y, self.camera_z, 0], 50)
19651966
time.sleep(2)
19661967

1967-
elif device in ['myCobot 280 for MUSE Pi']:
1968+
elif device in ['myCobot 280 for RISC V']:
19681969
self.myCobot.send_coords([x, y, self.camera_z, 179.87, -3.78, -62.75], 25, 1)
19691970
self.check_position([x, y, self.camera_z, 179.87, -3.78, -62.75], 1)
19701971

@@ -1997,7 +1998,7 @@ def moved(self, x, y):
19971998
self.myCobot.set_coords([x, -y, self.camera_z, 0], 50)
19981999
time.sleep(2)
19992000

2000-
elif device in ['myCobot 280 for MUSE Pi']:
2001+
elif device in ['myCobot 280 for RISC V']:
20012002
self.myCobot.send_coords([x, y, self.camera_z, 179.87, -3.78, -62.75], 25, 1)
20022003
self.check_position([x, y, self.camera_z, 179.87, -3.78, -62.75], 1)
20032004

@@ -2030,7 +2031,7 @@ def moved(self, x, y):
20302031
# self.stop_wait(3)
20312032
self.check_position([tmp[0], 5.39, -83.49, -10.37, -0.08, tmp[5]], 0)
20322033

2033-
elif device in ['myCobot 280 for MUSE Pi']:
2034+
elif device in ['myCobot 280 for RISC V']:
20342035
self.myCobot.send_angles([tmp[0], -0.71, -74.49, -23.02, -0.79, tmp[5]], 25)
20352036
self.check_position([tmp[0], -0.71, -74.49, -23.02, -0.79, tmp[5]], 0)
20362037

@@ -2055,7 +2056,7 @@ def moved(self, x, y):
20552056
self.myCobot.set_coords(self.move_coords[color], 40)
20562057
self.stop_wait(4)
20572058

2058-
elif device in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for MUSE Pi']:
2059+
elif device in ['myCobot 280 for Pi', 'myCobot 280 for M5', 'myCobot 280 for RISC V']:
20592060
self.myCobot.send_angles(self.new_move_coords_to_angles[color], 25)
20602061
self.check_position(self.new_move_coords_to_angles[color], 0)
20612062
else:
@@ -2091,7 +2092,7 @@ def pump_on(self):
20912092
else:
20922093
self.myCobot.set_basic_output(5, 0)
20932094
time.sleep(0.05)
2094-
elif self.comboBox_device.currentText() in self.MUSE_Pi:
2095+
elif self.comboBox_device.currentText() in self.RISC_V:
20952096
from gpiozero.pins.lgpio import LGPIOFactory
20962097
from gpiozero import Device, LED
20972098
Device.pin_factory = LGPIOFactory(chip=0) # 显式指定/dev/gpiochip0
@@ -2129,7 +2130,7 @@ def pump_off(self):
21292130
self.myCobot.set_basic_output(2, 1)
21302131
time.sleep(0.05)
21312132

2132-
elif self.comboBox_device.currentText() in self.MUSE_Pi:
2133+
elif self.comboBox_device.currentText() in self.RISC_V:
21332134
from gpiozero.pins.lgpio import LGPIOFactory
21342135
from gpiozero import Device, LED
21352136
Device.pin_factory = LGPIOFactory(chip=0) # 显式指定/dev/gpiochip0

0 commit comments

Comments
 (0)