mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
update README
This commit is contained in:
parent
b035546361
commit
6fd7298cc7
3 changed files with 5 additions and 112 deletions
|
|
@ -36,7 +36,7 @@ RUN pip install "pymycobot $PYMYCOBOT_VERSION" --user
|
||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
WORKDIR /catkin_ws/src
|
WORKDIR /catkin_ws/src
|
||||||
ADD . myCobotROS
|
ADD . mycobot_ros
|
||||||
WORKDIR /catkin_ws
|
WORKDIR /catkin_ws
|
||||||
RUN catkin_make
|
RUN catkin_make
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,13 +109,13 @@ python scripts/test.py
|
||||||
- launch ros and rviz
|
- launch ros and rviz
|
||||||
|
|
||||||
```
|
```
|
||||||
roslaunch mycobot_ros control_slider.launch
|
roslaunch mycobot_ros mycobot_slider.launch
|
||||||
```
|
```
|
||||||
|
|
||||||
- run python script
|
- run python script
|
||||||
|
|
||||||
```
|
```
|
||||||
rosrun mycobot_ros control_slider.py
|
rosrun mycobot_ros slider_control.py
|
||||||
```
|
```
|
||||||
|
|
||||||
- **The model moves with the real manipulator**
|
- **The model moves with the real manipulator**
|
||||||
|
|
@ -123,13 +123,13 @@ python scripts/test.py
|
||||||
- launch ros and rviz
|
- launch ros and rviz
|
||||||
|
|
||||||
```
|
```
|
||||||
roslanuch mycobot_ros mycobot.launch
|
roslanuch mycobot_ros mycobot_follow.launch
|
||||||
```
|
```
|
||||||
|
|
||||||
- run python script
|
- run python script
|
||||||
|
|
||||||
```
|
```
|
||||||
rosrun mycobot_ros display.py
|
rosrun mycobot_ros follow_display.py
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Open the keyboard controller**
|
- **Open the keyboard controller**
|
||||||
|
|
|
||||||
107
READMEcn.md
107
READMEcn.md
|
|
@ -1,107 +0,0 @@
|
||||||
# mycobot_ros
|
|
||||||
|
|
||||||
[](README.md)
|
|
||||||
|
|
||||||
[English](README.md) | [中文](READMEcn.md)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
**注意**:
|
|
||||||
|
|
||||||
<!-- This is the mycobot ROS package designed by Zhang Lijun([lijun.zhang@elephantrobotics.com]()) -->
|
|
||||||
|
|
||||||
> 请确保顶部的 Atom 烧入 `Atom`,底部的 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
|
|
||||||
|
|
||||||
**如果你的`Atom` 是 2.3 或更早的, 或者 `pymycobot` 是 1.\*, 请查看分支 [before](https://github.com/elephantrobotics/myCobotRos/tree/before)**
|
|
||||||
|
|
||||||
ROS 下载地址:[http://wiki.ros.org/ROS/Installation](http://wiki.ros.org/ROS/Installation)
|
|
||||||
|
|
||||||
## 1. 安装
|
|
||||||
|
|
||||||
### 1.1 前提
|
|
||||||
|
|
||||||
要使用该包,请确保 [python api](https://github.com/elephantrobotics/pymycobot.git) 已正确安装。
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pip install pymycobot --user
|
|
||||||
```
|
|
||||||
|
|
||||||
### 1.2 Ros 包的下载和安装
|
|
||||||
|
|
||||||
将该 ros 包安装到 Catkin 的 src 文件夹中。
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ cd ~/catkin_ws/src
|
|
||||||
$ git clone https://github.com/elephantrobotics/mycobot_ros.git
|
|
||||||
$ cd ~/catkin_ws
|
|
||||||
$ catkin_make
|
|
||||||
```
|
|
||||||
|
|
||||||
### 1.3 你可以选择测试 Python API
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd ~/catkin_ws/src/mycobot_ros
|
|
||||||
python 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 启动和运行
|
|
||||||
|
|
||||||
- 使用滑块控制
|
|
||||||
|
|
||||||
- 启动 ros 和 rviz
|
|
||||||
|
|
||||||
```
|
|
||||||
roslaunch mycobot_ros control_slider.launch
|
|
||||||
```
|
|
||||||
|
|
||||||
- 运行 python 脚本
|
|
||||||
|
|
||||||
```
|
|
||||||
rosrun mycobot_ros control_slider.py
|
|
||||||
```
|
|
||||||
|
|
||||||
- 仿真模型同步机械臂
|
|
||||||
|
|
||||||
- 启动 ros 和 rviz
|
|
||||||
|
|
||||||
```
|
|
||||||
roslanuch mycobot_ros mycobot.launch
|
|
||||||
```
|
|
||||||
|
|
||||||
- 运行 python 脚本
|
|
||||||
|
|
||||||
```
|
|
||||||
rosrun mycobot_ros display.py
|
|
||||||
```
|
|
||||||
|
|
||||||
## Q & A
|
|
||||||
|
|
||||||
**Q: error[101]**
|
|
||||||
|
|
||||||
**A**: 请确保的你的串口没有被占用,以及 Basic 和 Atom 烧入了正确的固件。
|
|
||||||
Loading…
Add table
Reference in a new issue