From d2e3ba64eccb4352acca263661a4921a538d0e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=AB=8B=E5=86=9B?= Date: Mon, 28 Dec 2020 13:44:04 +0800 Subject: [PATCH] feat(test): add test file . --- README.md | 9 +++++++++ scripts/test.py | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100644 scripts/test.py diff --git a/README.md b/README.md index 94d8a12..edbe8a1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/scripts/test.py b/scripts/test.py new file mode 100644 index 0000000..2860838 --- /dev/null +++ b/scripts/test.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 +from pythonAPI.mycobot import MyCobot + +if __name__ == '__main__': + mycobot = MyCobot() + mycobot.set_color("ff0000") +