feat(test): add test file .

This commit is contained in:
张立军 2020-12-28 13:44:04 +08:00
parent 9c54b94a90
commit d2e3ba64ec
2 changed files with 16 additions and 0 deletions

View file

@ -24,6 +24,15 @@ $ cd ~/catkin_ws
$ 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.1 Nodes

7
scripts/test.py Normal file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env python3
from pythonAPI.mycobot import MyCobot
if __name__ == '__main__':
mycobot = MyCobot()
mycobot.set_color("ff0000")