hanbaoaaa 发表于 2021-6-29 18:13:44

一个esp32的绘图机械臂项目

一个可以绘制你想绘制的东西的机械臂项目.## pa_RobotArm(pa机械臂

## Intro(介绍

####A robot arm project that can draw what you want

#### 一个可以绘制你想绘制的东西的机械臂项目

------



Run host on ipad, and draw on itself在ipad上运行上位机并且在它上面画画


Draw a cat画猫猫

#### The host is written with vue ( The old version using QT)

上位机是用vue写的 (也有旧版本使用的QT+串口协议)

github: (https://github.com/ActivePeter/RobotArmHost)

demo: (https://hanbaoaaa.xyz/apps/RobotArmHost/)

draw path on canvas

在canvas 上绘制轨迹

load picture and generate path

加载图片并生成路径

## Language(语言

c/c++ (mcu)

vue (host) (qt: old version)

## Model Conversion(模型换算

check the model **describe file** and **code**

查看**describe 文件** 和**代码**

[./model_describe.md](https://github.com/ActivePeter/paRobotArm/blob/main/model_describe.md)

[./main/RobotArm/RobotArmApp/RobotArmModel.cpp](https://github.com/ActivePeter/paRobotArm/blob/main/main/RobotArm/RobotArmApp/RobotArmModel.cpp)

## Developement(开发

1. get **vscode**, install the idf extension in vscode and set up basic **esp32** development environment

   获取 **vscode**, 在vscode里安装idf插件 并设置好基础的**esp32**开发环境

2. install the necessary **extensions**, the describe of extensions is in the **Design** part

   安装必要的vscode插件, 关于插件的描述在**设计**部分

> Before coding, you should have a **darm robot arm** as that in picture.
>
> Also you should know how to connect **robot arm stepper - stepper driver(a4988) - mcu(esp32)**
>
> **libHelperTree.json** the gpio needed is describe in config tree file

> 在开始写代码之前, 你应该获得一个跟图里一样的dart机械臂
>
> 当然你也应该知道如何链接 **机械臂步进电机 - 步进电机驱动(a4988) - mcu(esp32)**
>
> **libHelperTree.json** 关于gpio的描述可以参考这个文件,当然你也可以自行修改

1. Get my source from github, use my **(https://github.com/ActivePeter/SubmoduleHelper-vscode)** or **native git commands** to load submodules.

   从github获取我的源码, 使用我的 **(https://github.com/ActivePeter/SubmoduleHelper-vscode)** 或**原生 git 指令**来加载子模块.

2. Run build through vscode command pallete

   在vscode命令面板执行编译和下载

## Design(设计

1. It is mainly written in **c++** and well **modularized**.

   Abstracting the **driver layer** through my **(https://github.com/ActivePeter/paMcuLib)**, which makes my MCU project can be easily transferred to other platformsAll the logic of the robot arm is put in class **RobotArmApp**, so this robot arm project is also easy to be transplanted

   主要使用**c++\**编写,并且做了比较完备的\**模块化处理**

   通过我的单片机通用库 **(https://github.com/ActivePeter/paMcuLib)**,对**驱动层**进行了统一的抽象,这使得我的单片机项目可以轻易的被转移到其他平台上。

   所有跟机械臂相关的逻辑都放在 **RobotArmApp** 类里。通过创建对象来进行必要函数的调用,所以机械臂项目本身也很容易迁移平台

2. uses my vscode extension (https://github.com/ActivePeter/MacroDefineHelper-vscode), I can set the platform related things easily(such as gpio)

   使用我的vscode插件 (https://github.com/ActivePeter/MacroDefineHelper-vscode), 我可以**轻易的修改平台相关的宏定义参数**并且生成对应头文件

   First I can set up **describe.txt** where I need platform related config macro.

   首先我可以在我需要特殊宏定义设置的模块文件夹内创建 **describe.txt**

   For example, here I need gpio config for robot arm. I created the describe.txt file to describe the header file and macros in it what I need.

   例如, 这里我需要给我的机械臂设置必要的gpio宏,那么我就像下图一样在文件里写入对应的描述,需要的头文件也可以自定义生成名称

   Then using my extension, a **config tree** will be automatically generated. And now I can easily set the macros.

   然后使用我的插件,自动生成一个配置树, 然后我可以轻易的修改宏对应的值

   Finally, using my extension, I can generate config header files to the pre-set path

   最终,使用我的插件,自动根据配置树生成对应的配置头文件

3. Using my another extension (https://github.com/ActivePeter/SubmoduleHelper-vscode), I can load my paMcuLib modules as git submodules easily. Only need **a json config** file to describe the repositories and paths. Also I can easily switch **used** to load/remove them.

   使用我的另一个插件 (https://github.com/ActivePeter/SubmoduleHelper-vscode), 我可以轻松的加载和管理我的**paMcuLib 通用库组件**. 只需要一个 **json 配置** 文件来描述仓库和对应的路径。我也可以通过修改**used**轻易的切换**是否使用这些子模块**

## Record

- #### 2021/6/20

almost finish. able to draw pictures.

基本完成,可以绘制图片以及轨迹

#### 2020/12/28 已经能够跟上位机通信来更新点序列了!

#### 2020/12/6已经可以顺利的画纵向平面的五角星啦!

hanbaoaaa 发表于 2021-6-29 18:32:26

https://github.com/ActivePeter/paRobotArm

一只小学生 发表于 2021-6-29 19:47:37

?????

hanbaoaaa 发表于 2021-6-30 14:52:03

一只小学生 发表于 2021-6-29 19:47
?????

昨天出bug了吧,这网站,现在突然又好了

一只小学生 发表于 2021-6-30 15:42:54

hanbaoaaa 发表于 2021-6-30 14:52
昨天出bug了吧,这网站,现在突然又好了

哦,明白了

一只小学生 发表于 2021-6-30 19:15:27

第一张图是加了个电磁铁吗

hanbaoaaa 发表于 2021-7-1 10:58:59

一只小学生 发表于 2021-6-30 19:15
第一张图是加了个电磁铁吗

只是一卷飞线

一只小学生 发表于 2021-7-1 11:05:02

哦{:5_140:}

霹雳豆沙包 发表于 2021-7-3 15:17:30

这个机械手臂能承受多大重量?

threadripper 发表于 2021-7-3 15:55:33

感谢分享

hanbaoaaa 发表于 2021-7-3 17:39:20

霹雳豆沙包 发表于 2021-7-3 15:17
这个机械手臂能承受多大重量?

没测过,就是一般的42步进电机

冷枪 发表于 2021-7-16 15:36:36

机械臂的图纸能分享一下吗,谢谢

拉乌拉乌 发表于 2021-8-23 16:58:45

前来学习
页: [1]
查看完整版本: 一个esp32的绘图机械臂项目