Skip to content

Commit ec575bb

Browse files
committed
修正案例脚本中的pymycobot库的使用
1 parent 3df6e7c commit ec575bb

File tree

9 files changed

+24
-253
lines changed

9 files changed

+24
-253
lines changed

10-ApplicationBasePython/10.1_320_PI-ApplicationPython/5_Handle_control.md

Lines changed: 0 additions & 125 deletions
This file was deleted.

10-ApplicationBasePython/10.2_320_M5-ApplicationPython/4_Handle_control.md

Lines changed: 0 additions & 104 deletions
This file was deleted.

7-ExamplesRobotsUsing/320M5_EN.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Then connect the suction pump control box line to the base IO of the robot arm
1313

1414
## 2 Suction pump test
1515
```python
16-
from pymycobot import MyCobot,utils
16+
from pymycobot import MyCobot320,utils
1717
import time
18-
arm=MyCobot(utils.get_port_list()[0])
18+
arm=MyCobot320(utils.get_port_list()[0])
1919
for i in range(1):
2020
arm.set_basic_output(1,0)#Turn on the suction pump
2121
time.sleep(2)
@@ -79,8 +79,8 @@ Note whether the MODE LED of the handle is on
7979
```python
8080
import pygame
8181
import sys
82-
from pymycobot import MyCobot,utils
83-
mc=MyCobot(utils.get_port_list()[0])
82+
from pymycobot import MyCobot320,utils
83+
mc=MyCobot320(utils.get_port_list()[0])
8484
init_angles=[0, 0, -90, 0, 90, 0]
8585
mc.sync_send_angles(init_angles,50)
8686
pygame.init()

7-ExamplesRobotsUsing/320M5_gripper.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Then use the gripper cable to connect the gripper box to the end IO of the robot
1818
## 3 Gripper test
1919
Run the following program, the gripper will repeat the action of closing and opening twice
2020
```python
21-
from pymycobot import MyCobot,utils
21+
from pymycobot import MyCobot320,utils
2222
import time
23-
arm=MyCobot(utils.get_port_list()[0])
23+
arm=MyCobot320(utils.get_port_list()[0])
2424

2525
if __name__=="__main__":
2626
arm.set_gripper_mode(0)# Set the gripper to transparent mode
@@ -36,14 +36,14 @@ Use the fast movement function of myblockly to teach the grabbing point and plac
3636

3737
## 5 Composite Applications
3838
```python
39-
from pymycobot import MyCobot,utils
39+
from pymycobot import MyCobot320,utils
4040
import time
4141

4242
init_angles=[-3.25, -2.46, -95.09, 9.22, 86.39, 93.33]#6 joint angles at the initial position
4343
grab_point=[214.5, -189.9, 185.5, -177.5, 1.91, 173.49]#Coordinates of the grab point
4444
place_point=[214.5, -50.9, 185.5, -177.5, 1.91, 173.49]#Coordinates of the placement point
4545

46-
arm=MyCobot(utils.get_port_list()[0])
46+
arm=MyCobot320(utils.get_port_list()[0])
4747

4848
if __name__=="__main__":
4949
arm.set_gripper_state(0,100)#Open the gripper first

7-ExamplesRobotsUsing/320M5_pump.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Then connect the wire of the suction pump control box to the base IO of the robo
1313
## 3 Suction pump test
1414
Run the following program, the suction pump will repeat the opening and closing action twice
1515
```python
16-
from pymycobot import MyCobot,utils
16+
from pymycobot import MyCobot320,utils
1717
import time
18-
arm=MyCobot(utils.get_port_list()[0])
18+
arm=MyCobot320(utils.get_port_list()[0])
1919
for i in range(2):
2020
arm.set_basic_output(1,0)#OUT1 output open
2121
time.sleep(2)
@@ -29,14 +29,14 @@ Use the fast movement function of myblockly to teach the grabbing point and plac
2929

3030
## 5 Composite Applications
3131
```python
32-
from pymycobot import MyCobot,utils
32+
from pymycobot import MyCobot320,utils
3333
import time
3434

3535
init_angles=[-3.25, -2.46, -95.09, 9.22, 86.39, 93.33]#6 joint angles at the initial position
3636
grab_point=[196.9, -197.1, 124.5, -178.8, 1.25, 173.32]#Coordinates of the grab point
3737
place_point=[196.9, -97.1, 124.5, -178.8, 1.25, 173.32]#Coordinates of the placement point
3838

39-
arm=MyCobot(utils.get_port_list()[0])
39+
arm=MyCobot320(utils.get_port_list()[0])
4040

4141
if __name__=="__main__":
4242
arm.set_basic_output(1,1)#Turn off the suction pump first

7-ExamplesRobotsUsing/320PI_EN.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Then connect the suction pump control box line to the base IO of the robot arm
1313

1414
## 2 Suction pump test
1515
```python
16-
from pymycobot import MyCobot,utils
16+
from pymycobot import MyCobot320,utils
1717
import time
18-
arm=MyCobot(utils.get_port_list()[0])
18+
arm=MyCobot320('/dev/ttyAMA0', 115200)
1919
for i in range(1):
2020
arm.set_basic_output(1,0)#Turn on the suction pump
2121
time.sleep(2)
@@ -76,8 +76,8 @@ Note whether the MODE LED of the handle is on
7676
```python
7777
import pygame
7878
import sys
79-
from pymycobot import MyCobot,utils
80-
mc=MyCobot(utils.get_port_list()[0])
79+
from pymycobot import MyCobot320,utils
80+
mc=MyCobot320('/dev/ttyAMA0', 115200)
8181
init_angles=[0, 0, -90, 0, 90, 0]
8282
mc.sync_send_angles(init_angles,50)
8383
pygame.init()

7-ExamplesRobotsUsing/320PI_gripper.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Then use the gripper cable to connect the gripper box to the end IO of the robot
1818
## 3 Gripper test
1919
Run the following program, the gripper will repeat the action of closing and opening twice
2020
```python
21-
from pymycobot import MyCobot,PI_PORT,PI_BAUD
21+
from pymycobot import MyCobot320,PI_PORT
2222
import time
23-
arm=MyCobot(PI_PORT,PI_BAUD)
23+
arm=MyCobot320(PI_PORT,115200)
2424

2525
if __name__=="__main__":
2626
arm.set_gripper_mode(0)#Gripper is set to transparent mode
@@ -36,14 +36,14 @@ Use the fast movement function of myblockly to teach the grabbing point and plac
3636

3737
## 5 Composite Application
3838
```python
39-
from pymycobot import MyCobot,PI_PORT,PI_BAUD
39+
from pymycobot import MyCobot320,PI_PORT
4040
import time
4141

4242
init_angles=[-3.25, -2.46, -95.09, 9.22, 86.39, 93.33]#6 joint angles at the initial position
4343
grab_point=[214.5, -189.9, 185.5, -177.5, 1.91, 173.49]#Coordinates of the grab point
4444
place_point=[214.5, -50.9, 185.5, -177.5, 1.91, 173.49]#Coordinates of the placement point
4545

46-
arm=MyCobot(PI_PORT,PI_BAUD)
46+
arm=MyCobot320(PI_PORT,115200)
4747

4848
if __name__=="__main__":
4949
arm.set_gripper_state(0,100)#Open the gripper first

7-ExamplesRobotsUsing/320PI_pump.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Then connect the wire of the suction pump control box to the base IO of the robo
1313
## 3 Suction pump test
1414
Run the following program, the suction pump will repeat the opening and closing action twice
1515
```python
16-
from pymycobot import MyCobot,PI_PORT,PI_BAUD
16+
from pymycobot import MyCobot,PI_PORT
1717
import time
18-
arm=MyCobot(PI_PORT,PI_BAUD)
18+
arm=MyCobot320(PI_PORT,115200)
1919
for i in range(2):
2020
arm.set_basic_output(1,0)#OUT1 output open
2121
time.sleep(2)
@@ -29,13 +29,13 @@ Use the fast movement function of myblockly to teach the grabbing point and plac
2929

3030
## 5 Composite Application
3131
```python
32-
from pymycobot import MyCobot,PI_PORT,PI_BAUD
32+
from pymycobot import MyCobot320,PI_PORT
3333
import time
3434

3535
init_angles=[-3.25, -2.46, -95.09, 9.22, 86.39, 93.33]#6 joint angles at the initial position
3636
grab_point=[196.9, -197.1, 124.5, -178.8, 1.25, 173.32]#Coordinates of the grab point
3737
place_point=[196.9, -97.1, 124.5, -178.8, 1.25, 173.32]#Coordinates of the placement point
38-
arm=MyCobot(PI_PORT,PI_BAUD)
38+
arm=MyCobot320(PI_PORT,115200)
3939

4040
if __name__=="__main__":
4141
arm.set_basic_output(1,1)#Turn off the suction pump first
-61 KB
Loading

0 commit comments

Comments
 (0)