XOMiSpd1 - OMiLAB Robotic Spider Experiment 1

Keywords: image analysis, rule engine

Use Case

The use case is to create SVG image data and convert it into a drawing using the mSpider bot. The reason for using SVG images, is that they are both human and machine readable through the XML markup language that uses tags. It is easy to understand and edit the SVG file. Further, it is also scalable. The image is processed using a drools rule engine, which sends the commands to the mSpider bot.

Experiment

Tasks 

  • Build mDrawBot
  • Setup and measure mDrawBot
  • Analyze firmware
  • Develop client Application
  • Integrate Drools
  • Develop demo Application

 

mSpider

  • mSpider can draw on wall or white boards
  • Two stepper motors control the movement of mSpider
  • Robot is controlled by an Arduino compatible mCore module
  • Basic move commands available in firmware

 

The mSpider bot has two strings both with a motor that feeds or pulls in the string. The motors can either turn clockwise or counter clockwise. Using M serial commands the mSpider bot can be configured and the Drawing was created using the G serial commands. These commands are based on a G-code standard.

Cmd

Name

Parameters

G1

XY Move

X: X-Position

Y: Y:Position

Z: Z-Position (not implemented)

A: AuxDelay

F: Speed (not implemented)

G28

Home

(none)

M1

Pen

Pen position as int

M2

Pen pos setup

U: Up-Value

D: Down-Value

M3

Aux delay

Delay value as int

M4

Laser power

Laser value as int

M5

Robot setup

A: Motor A Direction (0/1)

B: Motor B Direction (0/1)

W: Distance between Motors

H: Vertical Distance to Motors

S: Speed (not implemented)

M10

Echo robot setup

Prints current setup

 

  • Firmware itself is undocumented, but source code is available
  • Commands represent a tiny subset of G-code
  • Movements are not linear in x/y space
  • A Delay of about 2.5s is required after opening serial port for initialisation to succeed.

 

The lines were not straight over long distances, that is why every line had to be split up into smaller lines of 30mm.

 

Markup Language

The XML markup language is used. It incorporates Tags such as: “” , which specifies how the image is to be drawn. The possible values inside the path variable are the “M” and “L” commands (There are more in the standard but these are the two, which are defined in the project). The “L” command draws a line. The “M” command moves to a position without drawing.

Results

  • Integrates Drools to parse subset of SVG syntax
  • Implements line splitting algorithm to make linear x/y movements possible

 

Video: https://youtu.be/AM5NARLGWqo 
Code: https://gitlab.dke.univie.ac.at/OMiROB/mDrawBot