- Applicable models and devices: myPalletizer 260 for M5、myCobot 280 for M5、ultraArm P340、mechArm 270 for M5、myCobot 280 for Pi、mechArm 270 for Pi、myCobot 280 for JN、myPalletizer 260 for Pi
Raspberry Pi Ubuntu20.04 system、Windows 10 or Windows 11、Jetson Nano Ubuntu20.04 system
使用前需确保系统已经安装以下第三方库,其中 opencv-python
和 opencv-contrib-python
必须指定安装 4.6.0.66 的版本,其他库原则上无需指定版本号。
opencv-python==4.6.0.66
opencv-contrib-python==4.6.0.66
pymycobot==3.6.3
PyQt5==5.15.10
如若未安装,请参考下面命令进行安装:
pip install pymycobot
pip install opencv-python==4.6.0.66
pip install opencv-contrib-python==4.6.0.66
pip install pyqt5
git clone https://github.com/elephantrobotics/AiKit_UI.git
path: Project file path
cd AiKit_UI
python main.py
After the startup is successful, as shown in the figure below:
Click the button in the upper right corner of the window to switch between languages (Chinese, English).
-
Click the 'CONNECT' button to connect, after the connection is successful, the 'CONNECT' button will change to 'DISCONNECT'
-
Clicking the 'DISCONNECT' button will disconnect the robot arm
-
After the robotic arm is successfully connected, the gray button will be lit and become clickable.
-
Set the camera serial number, the default serial number is 0, when Windows is used, the serial number is usually 1, and when Linux is used, the serial number is usually 0.
-
Click the 'Open' button to try to open the camera. If the opening fails, you should try to change the camera serial number; the camera is successfully opened as shown in the figure below: Note: Before use, the camera should be adjusted to be just above the QR code whiteboard, and there is a line The straight line is facing the mechanical arm.
-
After successfully opening the camera, click the 'Close' button to close the camera
-
Fully automatic mode, after clicking the 'Auto Mode' button, the recognition, grabbing, and placing will always be on; click the 'Auto Mode' button again to turn off the fully automatic mode.
-
Go back to the initial point of grabbing, click the 'Go' button, it will stop the current operation and return to the initial point.
-
Step-by-step Recognition recognition: click the 'Run' button to start the recognition, Aigorithm is the current algorithm used.
Pick: Click the 'Run' button to start the capture. After the capture is successful, the recognition and capture will be automatically closed, and you need to click it again for the next use.
Placement: Click the 'Run' button to start placing. The BinA, BinB, BinC, and BinD selection boxes correspond to BinA, BinB, BinC, and BinD 4 storage boxes, respectively, and will be placed in the designated storage box after selection.
-
Grab point adjustment, X offset, Y offset and Z offset respectively represent the positions of the X-axis, Y-axis and Z-axis of the robot arm coordinates, and can be modified according to actual needs. Click the 'Save' button to save. After saving successfully, it will follow the latest point position to fetch.
-
Open the file location, our code is open source, you can modify it according to your needs, click the 'Open File' button to open the file location.
Open the 'main.py' file and modify it
Note: The 'main.py.bak' file is the backup of the 'main.py' file, delete the 'main.py' file when you need to use it, and re-modify the 'main.py. The suffix of the bak' file is 'main.py'; then re-backup the 'main.py' file and name it 'main.py.bak'; you can also choose to re-download the project. -
Algorithm selection includes color recognition, shape recognition, two-dimensional code recognition, and Keypoints recognition. Selecting the corresponding algorithm will perform corresponding recognition.
-
How to use yolov5. After successfully connecting the robotic arm, the algorithm selects 'yolov5'
then turn on the camera
Put in the picture that needs to be recognized, and then click the Cut button
Intercept the whiteboard part of the QR code, press Enter to confirm (repeatable interception)
Then identify and grab. -
Add a picture for 'Keypoints'
Click the 'Add' button, the camera will open and a prompt will appear.
Click the 'Cut' button, the current camera content will be intercepted, and a prompt will be given to 'press the ENTER key after the content needs to be saved'Frame the content to be saved and press the ENTER key to start selecting the saved area, corresponding to BinA, BinB, BinC, BinD 4 storage boxes.
-
Click the 'Exit' button to exit adding pictures. Note: If you start capturing, please exit after capturing. You can choose not to save the captured pictures.