Contact me: hankecnc@gmail.com

通过摄像头获取工件的高度信息 #36

推推 grbl 3年前 (2023-02-03) 311次浏览
关闭
wwwlxs 开了这个issue 2018 年 10 月 20 日 · 110条评论
 Closed

Get the height information of a work piece by a camera#36

wwwlxs opened this issue on Oct 20, 2018 · 110 comments

评论

通过摄像头获取工件的高度信息 #36

Hi Svenhb ,可以通过USB摄像头的焦距信息获取工件的高度信息来获取高度图数据而不是探头以便更快地处理吗?

通过摄像头获取工件的高度信息 #36
作者

或者使用kinect/intel realsense dephth camera

通过摄像头获取工件的高度信息 #36
所有者

最后你想要一个外部高度测量来做 z 轴的偏移?
– 如何读出相机的焦距信息?听起来不是很准确。
– 连接 kinect 听起来有点矫枉过正
也许你构建了一个外部设备并通过“DIY 控件”(https://github.com/svenhb/GRBL-Plotter/wiki/DIY-control)连接它,然后我需要实施一些新的命令来处理信息。

通过摄像头获取工件的高度信息 #36 svenhb 添加了 增强 标签 2018 年 10 月 20 日
通过摄像头获取工件的高度信息 #36
作者

Hi Svenhb ,可以从松下HG-C系列测量传感器获得高度信息吗?CMOS 激光传感器与光电传感器一样紧凑,可以像位移传感器一样准确地显示实际测量的距离。
https://www.panasonic-electric-works.com/se/hg-c-measurement-sensor.htm

通过摄像头获取工件的高度信息 #36
所有者

它可能有效,但我没有得到所需的应用程序:
通常您想知道给定 Z 位置的工具尖端和工件之间的距离。补偿刀具偏移(每个刀具在固定在主轴上时显示不同的长度)。
然后您的传感器需要测量工具尖端的自下而上 – 它有效吗?
然后你需要读取距离并手动输入软件。或者如何将距离信息输入 GRBL-Plotter?(也许通过“DIY-Control”)。

Or shows the tool always the same offset and you just need to know the Z-pos of the workpiece surface?
To adapt any kind of sensor, you need to build the hardware, which can be connected via COMx to the PC, sending the height information in an known format.
Then I can make an interface to read and process the information.

通过摄像头获取工件的高度信息 #36
Author

Hi sven,
There is an USB Data Acquisition Module to adapt the panasonic HG C1050 sensor,which can be connected via COMx to the PC, and sending the height information to PC in an TXT/Excel format by Labview app. It can send height data to a computer tens or thousands of times per second,But how can I combine the height data with the xy coordinates of the current position by Grbl-plotter app? Thus forming a height map.Or how to get the distance-information into GRBL-Plotter via ‘DIY-Control?

通过摄像头获取工件的高度信息 #36
Author

USB Data Acquisition Module
通过摄像头获取工件的高度信息 #36
通过摄像头获取工件的高度信息 #36
通过摄像头获取工件的高度信息 #36

通过摄像头获取工件的高度信息 #36
Author
wwwlxs commented 2018 年 11 月 10 日  

this is USB Data Acquisition Module video
USB Data Acquisition Module mp4.zip

通过摄像头获取工件的高度信息 #36
Owner
svenhb commented 2018 年 11 月 11 日  

I think there are two options:

  1. a lot of work for me to get and process the external height data. Because it’s not compatible with the current implementation – see below.
  2. you write your own software, perhaps using the ‘DIY-Control’ interface. You then send xy coordinates to GRBL-Plotter, wait for idle, then check and save your height information in the format you like…

The current implementaion is: I move the specific XY position and start probing, the probing answer from grbl-hardware ([PRB:0.000,0.000,0.000:0]) triggers my heigth-measurement module to store the height information.

通过摄像头获取工件的高度信息 #36
Author

Thanks for your help!

通过摄像头获取工件的高度信息 #36
Author

happy new year!svenhb
now i use another Arduino to send heigth-measurement (Z position with “mm”) to “diy-control”interface real time,
could you help me to take the heigth-measurement from”diy-control”to heigth-measurement module to store the height information instead of the probing answer from G38.3?

通过摄像头获取工件的高度信息 #36
Owner
svenhb commented 2019 年 1 月 1 日 via email   

通过摄像头获取工件的高度信息 #36
Author

thanks
i conect panasonic HG C1050 sensor to Arduino UNO, than send the actual Position to ‘DIY-Control’ with this code:

void setup() {
Serial.begin(115200);
}

void loop() {
float distance;
distance=map(analogRead(0),0,1023,-1500,1500);
Serial.println(distance/100);
delay(100);
}

通过摄像头获取工件的高度信息 #36
Author

and the DIY-control display height information like this:

Open COM18
< -8.82
< -8.82
< -8.85
< -8.91
< -8.85
< -8.85
< -8.85
< -8.85
< -8.82

通过摄像头获取工件的高度信息 #36
Owner
svenhb commented 2019 年 1 月 1 日 via email   

通过摄像头获取工件的高度信息 #36
所有者

如果需要触发器,可以使用隐藏在 GCode 注释中的特定命令对自定义按钮进行编程,也许是“($TRG1)”,然后可以通过 DIY 控件产生一条消息,如“[TRG1]”。

在下一个版本中,我将支持这一点:自定义按钮(如“($abc)”)中的任何单个字符串都将通过 DIY-Control 作为“[abc]”发送

通过摄像头获取工件的高度信息 #36
作者

非常感谢!我认为有2种设计可以避免移动z轴,这样可以节省很多时间: 第一种是在grbplotter的height-map模块中增加获取z轴位置信息的方式。之前z的位置是g38.x反馈的,现在改为直接从diy-control接收到的瞬时z值。这个 z 值(以毫米为单位)由第二个 Arduino 通过另一个 COM 发送。
第二种是直接修改grbl固件g32.1-38.4的运动模块,将它们的运动模式替换为“获取第二个arduino的z值”

通过摄像头获取工件的高度信息 #36
作者

也许发送“G92 Z-8.82”来设置 Z 值?
像这样制作高度图:
<?xml version="1.0" encoding="utf-8"?> <heightmap MinX="0" MinY="0" MaxX="25" MaxY="25" SizeX="85" SizeY="85"> <point X="0" Y="0">-8.82</point> <point X="0" Y="1">-8.82</point> <point X="0" Y="2">-8.85</point> <point X="0" Y="3">-8.91</point> <point X="0" Y="4">-8.85</point> .............

通过摄像头获取工件的高度信息 #36
所有者

啊,你想从你的 z 值生成一个高度图?
然后我应该修改表面扫描的代码以请求替代的 Z 值而不是执行 G38.3 …
您可以经常将实际高度作为“Z-8.82”发送到 DIY-Control,我将接管这个高度图的值…

通过摄像头获取工件的高度信息 #36
作者

是的,我想通过传感器从 z 值生成高度图,第二个 Arduino 每秒发送数百个实际高度到 Diy-control,所以它只移动 XY 轴并避免通过 G38 移动 z 轴.3 获取实际高度。这将提高数百倍的速度并节省大量创建高度图的时间。

通过摄像头获取工件的高度信息 #36
所有者

我找到了以下解决方案(在下一个版本中):您以“(PRB:Z-5.12)”格式发送您的值 – 在括号中由 grbl 作为注释处理(如果没有流式传输,则此数据将通过 arduino 传递并将移动 z 轴)。
如果 GRBL-Plotter 收到有效消息,则原始探测 z 值将被新的替换。
为了加快探测速度,您将“最大深度”设置为 0.01 并将“保存高度”设置为 0。因此我不需要通过探测更改我的工作流程。

通过摄像头获取工件的高度信息 #36
作者

如果我设置“Max-depth”为0.01,“Save height”为0,z轴移动0.01mm,机器会抖动影响精度吗?
好的,谢谢svenhb!期待下个版本的到来。

通过摄像头获取工件的高度信息 #36
所有者

很好的提示……我做了一个工作来避免 G38。
将 Max-depth 设置为 0,然后将设置一个内部标志。
到达新位置后(状态切换到 IDLE),将读取 DIY-Control 的 Z 值,因此可以进行同步(检查 <IDLE,发送 Z 值)

通过摄像头获取工件的高度信息 #36
作者

好的,谢谢svenhb!

1条相似评论
通过摄像头获取工件的高度信息 #36
所有者

在版本 1.2.3.x 中实现,请检查功能