本文中的案例介紹了如何將 myCobot 280 機械臂與 myAGV 移動底盤進行集成,以構建用于智能自動化的多功能復合機器人。
一、引言
想象一下,有一個可以在固定位置或桌面上執行抓取和操作任務的機械臂,以及一個能夠在地面上運輸物體的移動 AGV。單獨來看,它們的功能是有限的。然而,當這兩個組件結合在一起時,它們會解鎖新的應用場景,增強機器人的靈活性和自動化能力。
在本文中,我將演示如何將 myCobot 280 Pi 機械臂與 myAGV Pi 移動 AGV 相結合,打造一款功能強大的復合機器人。通過跟隨我的步驟,您將學習如何從硬件組裝到編程控制,最終構建一個實用的智能系統,將機械臂與移動平臺集成在一起。
二、項目準備
1、本項目所使用的設備
Elephant Robotics myAGV(包括其他附件,比如充電器)
Raspberry Pi 4 Model B
M5Stack ESP32 Basic Core IoT Development Kit
Elephant Robotics myCobot 280 pi
以及其他常規設備,電腦、鼠標、監控器等等
2、軟件:
● PymyCobot(最新版本)
● ROS(確保安裝了最新的 ROS 軟件包)
注意:myCobot 280 Pi 中的 Raspberry Pi 系統預裝了基礎環境。您只需將 pymycobot 和 ROS 軟件包更新到最新版本。
三、項目運行
1、機械臂的控制
myCobot 280 Pi 預裝了 Ubuntu 系統,其控制通常是在 Python 環境中使用 pymycobot 庫實現的。以下是如何使用 Python 控制myCobot 280 Pi 的摘要。
2、API概述
1.關節角度控制
Function: `send_angles(degrees, speed)` Purpose: Send target angles to all joints of the robotic arm. Parameters: `degrees`: (List[float]) A list containing the angles for all joints, e.g., `[20, 20, 20, 20, 20, 20]`. `speed`: (int) The movement speed of the robotic arm, ranging from `0` to `100`. Return Value: `1`
2.協調控制
Function: `send_coords(coords, speed, mode)` Purpose: Move the robotic arm’s end-effector to a specific position and orientation in space. Parameters: `coords`: (List[float]) A list of six coordinate values representing `[x, y, z, rx, ry, rz]`. `speed`: (int) The movement speed of the robotic arm, ranging from `0` to `100`. `mode`: (int) Determines the movement path: `0`: Non-linear (random planning) path. The end-effector moves to the target point, maintaining the specified posture. `1`: Linear path. The end-effector moves in a straight line to the target point using intelligent planning. Return Value: `1`
3.延遲執行
Function: `time.sleep(t)` Purpose: Pausetheexecutionfor`t`secondsbeforeproceedingtothenextcommand.
4.抓手控制
Function: `set_gripper_value(value, speed, gripper_type=None)` Purpose: Rotate the gripper to a specified position at a given speed. Parameters: `value`: (int) Target position for the gripper, ranging from `0` to `256`. `speed`: (int) Speed of gripper movement, ranging from `0` to `100`. `gripper_type`: (int, optional) Specifies the gripper type: `1`: Adaptive gripper (default). `3`: Parallel gripper. `4`: Flexible gripper. Return Value: `1`
示例代碼
from pymycobot.mycobot280 import MyCobot280 import time # Initialize myCobot 280 Pi mc = MyCobot280("/dev/ttyAMA0", 1000000) # Retrieve and print the current coordinates of the end-effector coords = mc.get_coords() print(coords) # Move the end-effector to specific coordinates with linear movement mc.send_coords([57.0, -107.4, 316.3, -93.81, -12.71, -163.49], 80, 1) time.sleep(1.5) # Move the end-effector to another set of coordinates mc.send_coords([-13.7, -107.5, 223.9, 165.52, -75.41, -73.52], 80, 1) time.sleep(1.5) # Adjust a single coordinate with speed 70 mc.send_coord(1, -40, 70)
3、注意事項
●在運行腳本之前,確保手臂的工作空間和環境沒有障礙物。
●始終設置適當的速度,以防止可能損壞硬件的突然移動。
4、AGV的控制
由大象機器人公司開發的myAGV 2023 Pi是一款為研究、教育和個人制造商設計的移動機器人。它采用樹莓派4B核心主板,運行定制的Ubuntu Mate 20.04操作系統,確保流暢和用戶友好的操作。
●配備樹莓派4B,提供強大的性能和出色的可擴展性。
●包括360度激光雷達,用于全面掃描和環保意識。
●配備500萬像素HD攝像頭,用于物體識別和精確定位。
●運動競賽級Mecanum車輪可進行全方位運動,在復雜地形上具有靈活性。
●支持圖形化編程,使用戶能夠通過直觀的可視化界面進行開發和調試。
myAGV帶有內置的映射和導航功能。您只需要調用適當的腳本即可使用這些功能。
5、整合與通訊 安裝 myCobot 280有兩個用于安全連接的安裝孔。
安裝位置的選擇取決于機械臂的預期任務。建議將手臂安裝在myAGV的最前面位置,遠離myAGV接口。
機械臂電源myAGV具有專用的12V電源輸出接口,可為機械臂供電。這簡化了設置并確保機械臂具有可靠的電源。
安裝機械臂并為其供電后,連接鍵盤、鼠標和顯示器。通過此設置,您可以開始對集成復合機器人進行編程。
通訊
要在AGV和機械臂之間建立通信,請執行以下步驟:
1.連接到同一個網絡確保AGV和機械臂都連接到同一個本地網絡(WiFi)。這允許設備之間的無縫通信。
2.在機械臂上啟動服務器腳本在機械臂上運行服務器腳本以啟用通信。
打開機械臂上的終端并執行以下命令:
python Server.py
3.測試AGV的連接
在AGV上創建一個新的Python腳本以檢查與機械臂的連接是否正常運行。使用以下示例腳本:
from pymycobot import MyCobotSocket import time # Initialize the connection with the robotic arm arm = MyCobotSocket("192.168.1.248") # Replace with the actual IP address of the robotic arm # Send initial angles to the robotic arm arm.send_angles([0, 0, 0, 0, 0, 0], 50) time.sleep(2) # Adjust the angles to test movement arm.send_angles([0, 0, 0, 0, 0, -90], 50)
四、實際應用示例
讓我們嘗試一個簡單的運動控制任務,看看這個機器人能做什么。
我想把多余的零食退回零食盒。首先,我控制移動平臺移動到額外零食的位置。由于myAGV配備了全向輪子,它可以當場旋轉。
成功獲得目標后,我們繼續將零食放回原處。
小結
在本案例中,這一復合機器人結合了機械臂和移動AGV的功能,提供了具有巨大潛力的廣泛應用前景。
比如在智能物流倉儲中,它可以在倉庫內執行智能運輸任務。例如,機械臂可以處理揀貨,而AGV將物品運送到指定位置。
或者在農業和戶外應用中,復合機器人可用于水果采摘、作物檢查等。機械臂可以處理采摘任務,而AGV則移動到下一個采摘點。
在上述的實操過程中,我們模擬了一個智能倉儲場景,通過配備SLAM算法的移動AGV在將物體A運送到另一個位置的同時進行自主導航和檢查。
如果你想用真實的機械臂進行模擬,可以試試mycobot系列產品。如果你有其他關于機械臂使用的好的想法想要實現的話,也歡迎在下方留言和我們溝通。
-
機器人
+關注
關注
211文章
28733瀏覽量
208801 -
AGV
+關注
關注
27文章
1340瀏覽量
41304 -
機械臂
+關注
關注
12文章
527瀏覽量
24754
原文標題:機械臂和 AGV結合案例發布!構建用于智能自動化的多功能復合機器人
文章出處:【微信號:ElephantRobotics,微信公眾號:大象機器人】歡迎添加關注!文章轉載請注明出處。
發布評論請先 登錄
相關推薦
新松機器人成為國內復合機器人首創者
工業復合機器人應用前景廣闊,為制造業帶來新的機遇和挑戰
復合機器人在磁鋼上下料中的應用及其優勢分析
![<b class='flag-5'>復合機器人</b>在磁鋼上下料中的應用及其優勢分析](https://file1.elecfans.com/web2/M00/CE/26/wKgaomYg3uyACj1OAAmfvw-C3L0013.png)
復合機器人:重塑柔性生產的未來
![<b class='flag-5'>復合機器人</b>:重塑柔性生產的未來](https://file1.elecfans.com/web2/M00/EA/20/wKgZomZW4USAE_CsAAZs6_FsfH0194.png)
復合機器人:精密制造中的“微米級”精準助手
![<b class='flag-5'>復合機器人</b>:精密制造中的“微米級”精準助手](https://file1.elecfans.com/web2/M00/FF/F5/wKgZomarWViAEOtZAAtizzSoNM0080.png)
復合機器人在3c電子行業的應用
![<b class='flag-5'>復合機器人</b>在3c電子行業的應用](https://file1.elecfans.com/web3/M00/01/62/wKgZO2dSzaWAS_p-AAoKuDtAdwQ984.png)
評論