mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
feat(test): add test file .
This commit is contained in:
parent
9c54b94a90
commit
d2e3ba64ec
2 changed files with 16 additions and 0 deletions
|
|
@ -24,6 +24,15 @@ $ cd ~/catkin_ws
|
||||||
$ catkin_make
|
$ catkin_make
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 1.3 Test 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. Package Modules
|
||||||
|
|
||||||
### 2.1 Nodes
|
### 2.1 Nodes
|
||||||
|
|
|
||||||
7
scripts/test.py
Normal file
7
scripts/test.py
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
from pythonAPI.mycobot import MyCobot
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
mycobot = MyCobot()
|
||||||
|
mycobot.set_color("ff0000")
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue