Skip to content

Commit 32f0bb3

Browse files
committed
修改一些说明错误
1 parent 633f4bb commit 32f0bb3

File tree

5 files changed

+6
-111
lines changed

5 files changed

+6
-111
lines changed

DESCRIPTION.MD

Lines changed: 2 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,11 @@ Test:
1818

1919
This SDK is used for receiving CAN data frames and processing them into custom data types, without including data offset frames.
2020

21-
|Description |doc|
22-
|---|---|
23-
|Detailed description of the interface function.|[Interface README](./asserts/INTERFACE(EN).MD)|
24-
|Description of the protocol parsing section.|[Protocol README](./asserts/PROTOCOL_V1(EN).MD)|
25-
|Description of the message section.|[Msgs README](./asserts/MSGS(EN).MD)|
26-
|Piper DEMO list|[DMEO](./asserts/SDK_DEMO(EN).MD)|
27-
|Piper DEMO | [`piper_sdk/demo`](./demo/README.MD) |
28-
| Master-Slave Configuration and Data Reading for Dual Arms | [double_piper](./asserts/double_piper.MD) |
29-
| Open Source UI Using PyQT5 | [Piper_sdk_ui](https://github.com/agilexrobotics/Piper_sdk_ui.git) |
30-
| Q&A | [Q&A](./asserts/Q&A.MD) |
31-
3221
## 1 Installation Instructions
3322

3423
### 1.1 Install dependencies
3524

36-
The python-can version should be higher than 4.3.1.
25+
The python-can version should be higher than 3.3.4.
3726

3827
```shell
3928
pip3 install python-can
@@ -55,104 +44,10 @@ To uninstall
5544
pip3 uninstall piper_sdk
5645
```
5746

58-
### 1.2 Install can tools
59-
60-
```shell
61-
sudo apt update && sudo apt install can-utils ethtool
62-
```
63-
64-
These two tools are used to configure the CAN module.
65-
66-
If you encounter the error `ip: command not found` while running the bash script, please install the `ip` command by running `sudo apt-get install iproute2`.
67-
68-
## 2 Quick Start
69-
70-
### 2.1 Enable CAN module
71-
72-
#### 2.1.1 Activate a single CAN module, **using the `can_activate.sh` script here**
73-
74-
##### 1) PC with only one USB-to-CAN module inserted
75-
76-
Simply execute the script.
77-
78-
```bash
79-
bash can_activate.sh can0 1000000
80-
```
81-
82-
##### 2) PC is connected to multiple USB-to-CAN modules, but only one CAN module is activated at a time
83-
84-
Note: This is for scenarios where both the robotic arm and the chassis are used simultaneously.
85-
86-
(1) Check the hardware address of the CAN module connected to the USB port.
87-
88-
Unplug all CAN modules, then insert only the CAN module connected to the robotic arm into the PC and execute.
89-
90-
```shell
91-
sudo ethtool -i can0 | grep bus
92-
```
93-
94-
And record the value of `bus-info`, for example, `1-2:1.0`.
95-
96-
Note: **The CAN device inserted into the USB port with the hardware address `1-2:1.0` is renamed to `can_piper`, with a baud rate of 1000000, and is activated.**
97-
98-
(2) Activate the CAN device
99-
100-
Assuming the `bus-info` value recorded from the previous operation is `1-2:1.0`, execute:
101-
102-
```bash
103-
bash can_activate.sh can_piper 1000000 "1-2:1.0"
104-
```
105-
106-
Note: **This means that the CAN device connected to the USB port with hardware encoding `1-2:1.0` has been renamed to `can_piper`, set to a baud rate of 1,000,000, and activated.**
107-
108-
(3) Check if activation was successful.
109-
110-
Execute `ifconfig` to check if `can_piper` appears. If it does, the CAN module has been successfully configured.
111-
112-
#### 2.1.2 Activate multiple CAN modules simultaneously, **using the `can_config.sh` script here**
113-
114-
##### 1) Unplug and plug each CAN module one by one, and record the hardware address of each module corresponding to the USB port
115-
116-
In the `can_config.sh` script, the `EXPECTED_CAN_COUNT` parameter represents the number of CAN modules you want to activate. For this example, let's assume it is set to 2.
117-
118-
(1) Then, insert one of the CAN modules into the PC alone and execute.
119-
120-
```shell
121-
sudo ethtool -i can0 | grep bus
122-
```
123-
124-
and record the `bus-info` value, for example, `1-2:1.0`.
125-
126-
(2) Next, insert the next CAN module, making sure that it **cannot** be inserted into the same USB port as the previous CAN module, and then execute.
127-
128-
```shell
129-
sudo ethtool -i can1 | grep bus
130-
```
131-
132-
Note: **Generally, the first inserted CAN module defaults to `can0`, and the second one to `can1`. If the CAN interfaces are not found, use `bash find_all_can_port.sh` to check the CAN names corresponding to the USB addresses.**
133-
134-
##### 2) Predefine the USB ports, target interface names, and their bitrates
135-
136-
Assuming the `bus-info` values recorded from the previous operation are `1-2:1.0` and `1-4:1.0`, the `USB_PORTS["1-9:1.0"]="can_left:1000000"` should be updated as follows:
137-
138-
`USB_PORTS["1-2:1.0"]="can_left:1000000"`
139-
140-
`USB_PORTS["1-4:1.0"]="can_right:1000000"`
141-
142-
Note: **The CAN device inserted into the USB port with the hardware address `1-2:1.0` is renamed to `can_left`, with a baud rate of 1000000, and is activated.**
143-
144-
##### 3) Check the terminal output to see if activation was successful
145-
146-
Execute `bash can_config.sh`.
147-
148-
##### 4) Check if the CAN module was successfully configured
149-
150-
Execute `ifconfig` to check if `can_left` and `can_right` are listed. If they appear, it means the CAN modules have been successfully configured.
151-
15247
## Notes
15348

15449
- You need to activate the CAN device and set the correct baud rate before you can read messages from or control the robot arm.
155-
- The `C_PiperInterface` interface class accepts the name of an activated CAN interface as an argument during instantiation. This name can be obtained via `ifconfig`.
50+
- The `C_PiperInterface` interface class accepts the name of an activated CAN interface as an argument during instantiation.
15651
- Sometimes when executing a CAN send operation, the terminal might display `Message NOT sent`. This indicates that the CAN module has not successfully connected to the device. First, check the connection between the module and the robot arm, then power cycle the robot arm (turn it off and then on), and try sending again.
15752
- After creating an instance, the SDK interface will check if the built-in CAN module is activated. If you are using another CAN device, you can set the second parameter to `False`, for example: `piper = C_PiperInterface("can0", False)`.
15853

README(EN).md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This SDK is used for receiving CAN data frames and processing them into custom d
3333

3434
### 1.1 Install dependencies
3535

36-
The python-can version should be higher than 4.3.1.
36+
The python-can version should be higher than 3.3.4.
3737

3838
```shell
3939
pip3 install python-can

README.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Test:
3333

3434
### 1.1 安装依赖
3535

36-
注: python-can版本应高于4.3.1
36+
注: python-can版本应高于3.3.4
3737

3838
```shell
3939
pip3 install python-can

asserts/double_piper(EN).MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
See the interface description in the SDK for details.
1717

18-
[Interface_V1 README](./V1/INTERFACE_V1.MD) <br> [Interface_V2 README](./V2/INTERFACE_V2.MD)
18+
[Interface_V1 README](./INTERFACE.MD)
1919

2020
Here is just a brief description
2121

asserts/double_piper.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
详见SDK中接口函数文档
1717

18-
[Interface_V1 README](./V1/INTERFACE_V1.MD) <br> [Interface_V2 README](./V2/INTERFACE_V2.MD)
18+
[Interface_V1 README](./INTERFACE.MD)
1919

2020
这里只作简要
2121

0 commit comments

Comments
 (0)