mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
doc: add chinese README
This commit is contained in:
parent
d61bbc7c02
commit
aba2ec3306
3 changed files with 134 additions and 4 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
urdf.zip
|
||||
.DS_Store
|
||||
10
README.md
10
README.md
|
|
@ -1,5 +1,9 @@
|
|||
# myCobotROS
|
||||
|
||||
[](READMEcn.md)
|
||||
|
||||
[English](README.md) | [中文](READMEcn.md)
|
||||
|
||||

|
||||
|
||||
**Notes**:
|
||||
|
|
@ -29,20 +33,18 @@ $ cd ~/catkin_ws
|
|||
$ catkin_make
|
||||
```
|
||||
|
||||
### 1.3 Test API
|
||||
### 1.3 Test Python API
|
||||
|
||||
```bash
|
||||
cd ~/catkin_ws/src/myCobotROS
|
||||
python3 scripts/test.py
|
||||
```
|
||||
|
||||
If the myCobot color change to red, it's mean the API is working normally.
|
||||
|
||||
## 2. Package Modules
|
||||
|
||||
### 2.1 Nodes
|
||||
|
||||
- `display` is a display node. When the node is running, When the node is running, the model of ROS will show the movement of mycobot synchronously.
|
||||
- `display` is a display node. When the node is running, the model of ROS will show the movement of mycobot synchronously.
|
||||
- `control_slider` is the node which slider bar control.
|
||||
- `control_marker` is the node which use interactive marker control.
|
||||
|
||||
|
|
|
|||
125
READMEcn.md
Normal file
125
READMEcn.md
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
# myCobotROS
|
||||
|
||||
[](README.md)
|
||||
|
||||
[English](README.md) | [中文](READMEcn.md)
|
||||
|
||||

|
||||
|
||||
**注意**:
|
||||
|
||||
<!-- This is the mycobot ROS package designed by Zhang Lijun([lijun.zhang@elephantrobotics.com]()) -->
|
||||
|
||||
> 请确保顶部的 Atom 烧入 `Atom2.1alpha`,底部的 Basic 烧入 `Transponder`。烧录工具的下载地址: [https://github.com/elephantrobotics/myCobot/tree/main/Software](https://github.com/elephantrobotics/myCobot/tree/main/Software)<br>
|
||||
> 该包的测试环境:<br> ubuntu: 16.04LTS<br> ros version: 1.12.17
|
||||
|
||||
## 1. 安装
|
||||
|
||||
### 1.1 前提
|
||||
|
||||
要使用该包,请确保 [python api]() 已正确安装(已自带)。
|
||||
|
||||
如果你仅仅想单独使用 api, 你可以去到这里 [https://github.com/elephantrobotics/myCobotROS/blob/main/scripts/pythonAPI/README.md](https://github.com/elephantrobotics/myCobotROS/blob/main/scripts/pythonAPI/README.md)
|
||||
|
||||
### 1.2 Ros 包的下载和安装
|
||||
|
||||
将该 ros 包安装到 Catkin 的 src 文件夹中。
|
||||
|
||||
```bash
|
||||
$ cd ~/catkin_ws/src
|
||||
$ git clone https://github.com/elephantrobotics/myCobotROS.git
|
||||
$ cd ~/catkin_ws
|
||||
$ catkin_make
|
||||
```
|
||||
|
||||
### 1.3 你可以选择测试 Python API
|
||||
|
||||
```bash
|
||||
cd ~/catkin_ws/src/myCobotROS
|
||||
python3 scripts/test.py
|
||||
```
|
||||
|
||||
## 2. 模块
|
||||
|
||||
### 2.1 节点
|
||||
|
||||
- `display` 展示节点。 同步展示 myCobot 的姿态到仿真的模型。
|
||||
- `control_slider` 通过滑动条控制 myCobot。
|
||||
- `control_marker` 通过可交互的标记控制 myCobot。
|
||||
|
||||
### 2.2 主题
|
||||
|
||||
- `joint_states` - 控制和记录 myCobot 的状态.
|
||||
|
||||
```
|
||||
Message_type: std_msgs/JointState
|
||||
Data: position[float, float, float, float, float, float]
|
||||
```
|
||||
|
||||
## 3. RViz 可视化
|
||||
|
||||
### 3.1 功能
|
||||
|
||||
- 可视化 -- `display.launch`: This function will display robot arm movement in realtime when you manually move mycobot.
|
||||
|
||||
- 控制 -- `control.launch`: This function will allow you use slider bar to control movement of the robot arm.
|
||||
|
||||
### 3.2 启动和运行
|
||||
|
||||
-**步骤 1**: 在 terminal 中打开 roscore
|
||||
|
||||
```bash
|
||||
roscore #open another tab
|
||||
```
|
||||
|
||||
-**步骤 2**: 启动
|
||||
|
||||
a) 如果是展示或者用可交互标记控制, 在第二个 terminal 中运行:
|
||||
|
||||
```bash
|
||||
roslaunch myCobotROS mycobot.launch
|
||||
```
|
||||
|
||||
b) 如果是滑块控制, 在第二个 terminal 中运行:
|
||||
|
||||
```
|
||||
roslaunch myCobotROS control.launch
|
||||
```
|
||||
|
||||
-**步骤 3**: 打开 rviz(第三个 terminal)
|
||||
|
||||
```bash
|
||||
rosrun rviz rviz
|
||||
```
|
||||
|
||||
如果使用上面的命令,你将打开一个空白的 rviz,需要手动添加模块。当然,你也可以使用下面的命令打开 rviz 的同时加载一个保存好的 myCobot 模型。
|
||||
|
||||
```bash
|
||||
rosrun rviz rviz -d rospack find myCobotROS/config/mycobot.rviz
|
||||
```
|
||||
|
||||
-**步骤 4**: 运行 python 脚本(第四个 terminal)
|
||||
|
||||
a) 展示脚本
|
||||
|
||||
```bash
|
||||
rosrun myCobotROS display.py
|
||||
```
|
||||
|
||||
b) 滑块控制脚本
|
||||
|
||||
```bash
|
||||
rosrun myCobotROS control_slider.py
|
||||
```
|
||||
|
||||
c) 可交互标记控制脚本
|
||||
|
||||
```bash
|
||||
rosrun myCobotROS control_marker.py
|
||||
```
|
||||
|
||||
## Q & A
|
||||
|
||||
**Q: error[101]**
|
||||
|
||||
**A**: 请确保的你的串口没有被占用,以及 Basic 和 Atom 烧入了正确的固件。
|
||||
Loading…
Add table
Reference in a new issue