Robot can be painter | myCobot Pro 600 drawing



  • Background:

    When it comes to the robotic arm, the first reaction of most people is the industrial robotic arm is doing the work of the assembly line in the factory, but it is not. The robotic arm is like an accurate arm. The robotic arm can perform a number of works in daily life. For example, it can latte art, playing chess with human beings, restaurant ushers, massage, ultrasound, drawing, etc. The robotic arm has long been integrated into our daily life and will appear in various forms in the future.

    Recently, I’ve seen a series of videos on Youtube and Twitter about writing machines and machine drawing, so I thought I’d use the myCobot Pro 600 around me to try it out and see if I could draw with a robotic arm.

    What is myCobot Pro 600?

    myCobot Pro 600 is a robotic arm developed for education and commercial use with a Raspberry Pi microprocessor and embedded RoboFlow visual programming primitives from Elephant Robotics.myCobot Pro 600 uses an industrial grade servo, which is comparable to an industrial robotic arm. It is very good in this aspect of stability and can be a painter.
    (What is RobotFlow is described below.)
    0_1665741802296_111.1.jpg

    Plan:

    The first step is to get the outline of a photo, transform it to get the Cartesian coordinates of the outline, transfer it to the robotic arm to execute along the path, and then the robotic arm will be able to draw.
    Projects
    0_1665741521390_Projects.png

    Key points:

    1 Get the path/contour map of the image and convert it to Cartesian coordinates.

    2 The recognition of the pen up point and down point positions in the contour of the image.

    Projects:

    1 Inkscape
    Choose software that can draw graphics and can convert images into outlines/paths. Here we recommend Inkscape, which allows us to develop plugins on its software.

    Inkscape is a free and open source vector graphics editing software, and can fully comply with and support XML, SVG and CSS, and other open standard formats. It also has cross-platform support for multiple operating systems, windows, macOS, Linux, UNIX, etc.
    Inkscape
    0_1665741589383_inkscape.png
    2 Unicorn
    Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework.
    0_1665741604585_unicorn.png
    We used unicorn simulation to write a myCobot Cartesian coordinate transformation to combine the path/contour of the graph to simulate and finally generate the NGC file.
    Contents of an NGC file

    Elephant Robotics)
    G21 G94 G64 G40 (metric ftw)
    G90 (absolute mode)
    G92.2
    G4 P1 (wait 1s)
    G38.3F1000X38.18 Y-156.72 Z-60.01 A-121.90 B-31.55 C99.32
    G4 P1 (wait 1s)
    G01F1000X-505.03 Y-177.45 Z61.41 A67.37 B60.32 C-132.00
    G4 P1 (wait 1s)
    G92 X0 Y0 Z0 A0 B0 C0
    G4 P1 (wait 1s)
    G01 X0 Y0 Z20.00 A0 B0 C0
    G4 P1 (wait 1s)
    
    G0 Z0 (pen down)
    G4 P1 (wait 1ms)
    G0 Z10 (pen up)
    G4 P1 (wait 1ms)
    
    (Polyline consisting of 97 segments.)
    G1 X145.82 Y229.44 F2000.00
    G0 Z0.00 (pen down)
    G4 P1 (wait 1ms)
    G1 X151.53 Y225.73 F2000.00
    G1 X157.58 Y220.95 F2000.00
    ...
    

    (unicorn is an open source project, if you are interested, please refer to github for more)

    3 RobotFlow
    RobotFlow is an operating system for collaborative robotic arms developed specifically for Elephant Robotics with a user-friendly UI. It allows users to realize its functions through simple operations even if they do not know the underlying principles well. Finally, the NGC file generated from the image, transferred to RobotFlow and run, can realize the robotic arm drawing.
    myCobot pro 600 painting
    0_1665741537235_myCobot pro 600 painting.png

    0_1665741547002_222.png

    Process

    The project went as planned, but some problems arose.
    video:
    https://www.youtube.com/shorts/W4xHpRlfpOs

    Problems:

    1 Error in the NGC file when the outline/path of the image is generated.

    2 When drawing, some places were not drawn. The reason for this is attributed to the end unit, as the trajectory of the run is fixed, too much drop in the run to some places will cause the pen to be crushed.

    3 Some coordinates of myCobot exceed the limit and cannot be reached, so the program cannot proceed.

    Solutions:

    1 Select the picture as much as possible, the outline is a relatively clear picture, so that the generated NGC file will be able to achieve the drawing.

    2 Make the end device flexible so that it will not be damaged even when the pen is pressed.

    3 When setting the initial position, try to set the initial position with a control range from the limit.

    Show video:
    https://www.youtube.com/watch?v=QNvH5mAz4wU

    Summary:

    For some related information (plugins, code) in the above article, you can leave a comment below and I will share it with you. If you have good ideas to express welcome to discuss with us in the comments below ~

    More information:
    Home | Elephantrobotics
    Gitbook | Elephantrobotics
    GitHub | Open-Source



  • Looks good and would like to ask a few questions.
    1 Is it capable of painting any pattern?
    2 How wide a range can it work? Can it draw larger patterns?
    3 Is it possible to share the code?



  • 1 The result of the test was that the pattern was needed for a more pronounced outline.
    2 The working radius of the myCobot Pro 600 is within a range of 600 mm.
    3 This project is integrated into RobotFlow Elephant Robotics. The code is available for reference.