DeltaXRobot vision

General discussion about topics related to OpenMV.
Alchemist
Posts: 2
Joined: Tue Sep 22, 2020 3:31 pm

DeltaXRobot vision

Postby Alchemist » Tue Sep 22, 2020 3:53 pm

Hi Everyone,

I am new to robotics and not programmed for a while. For my first project I decided to buy a DeltaX2 pick and place robot from https://www.deltaxrobot.com.

Similar to uArm, I want to give vision to DeltaX2 and hoping a H7 Plus can communicate the x and y coordinates of object so DeltaX can pick and place.


Can you give me some pointers?

Many thanks,

Eric
User avatar
iabdalkader
Posts: 1247
Joined: Sun May 24, 2015 3:53 pm

Re: DeltaXRobot vision

Postby iabdalkader » Fri Oct 16, 2020 2:10 pm

Hi, we must have missed this post, sorry for the late reply.. Yes it's possible to send coordinates, have you tried anything yet ? If you need help with something let us know and please post your code.
Alchemist
Posts: 2
Joined: Tue Sep 22, 2020 3:31 pm

Re: DeltaXRobot vision

Postby Alchemist » Thu Nov 12, 2020 6:55 pm

Hi,

Sorry for my late response, I was waiting for the robot to arrive.

DeltaX can be controlled by Python (I'm using Visual Studio Code) to control. It appears to use Gcodes command. Here is a simple code just to move the head:

Code: Select all

#Windows OS
#install: pip install pyserial
 
import serial
import time
 
ser = serial.Serial('COM7',115200, timeout = 1)  # open serial port
time.sleep(2)    
print(ser.readline())
 
gcodes = []
gcodes.append('G28')
gcodes.append('G01 Z-320')
gcodes.append('G01 X-100')
gcodes.append('G01 Z-350')
 
gcodes.append('G01 Z-320')
gcodes.append('G01 X100')
gcodes.append('G01 Z-350')
 
gcodes.append('G01 Z-320')
gcodes.append('G01 X100 Y100')
gcodes.append('G01 Z-350')
 
gcodes.append('G01 X-100 Y-100 Z-320')
gcodes.append('G01 Z-350')
gcodes.append('G28')
 
for gcode in gcodes:
    print(gcode)
    gcodeLine = gcode + '\n'
    ser.write(gcodeLine.encode())
    while 1:
        response = ser.readline()
        print(response)
        if (response.find('Ok'.encode()) > -1):
            break
 
ser.close()

My initial project's aim is to pick up all the Tic Tac mints scattered and place them in a cup. Currently, I am connecting H7 Plus to the pc using USB cable and example codes such as Blob_tracking and find_Circle appear to work.

However, I haven't managed to transferred the data to VS Code.

A few questions I have not managed to find the answers to:

1. Do I have to use OpenMV IDE to access the H7 plus? Can I modify your example codes to work in Visual Studio Code python?

2. If I have to use OpenMV IDE, I need to transfer/print the blob X Y coordinates of each Tic Tac to a PC and the using VS Code Python to read the data. You have mentioned in the forum that the port needs to be closed. How? Can you share a short codes: OpenMV IDE and VS Code that demo this behaviour?

3, Other suggestions?

Thank you for you time.
Eric
User avatar
kwagyeman
Posts: 4676
Joined: Sun May 24, 2015 2:10 pm

Re: DeltaXRobot vision

Postby kwagyeman » Thu Nov 12, 2020 7:02 pm

You can program the OpenMV Cam using REPL, so, if you can script up Visual Studio to send python scripts over REPL then that is all you need. Here's a script that can command and control an OpenMV Cam: https://github.com/openmv/micropython/b ... pyboard.py
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 0 guests