Vision System for Industrial Robots

12. Software: Position_Calculation module
Update #10198  |  23 May 2015

Position_Calculation application

Main tasks of this module are:

  •  calculate pixels/millimeters ratio
  •  calculate objects local base position and orientation

Position Calculation – application + global and local base view


Mathematical theory

In order to explain how this class works I need to introduce you to mathematical theory at first. Whole calculations are based on homogeneous transformation and rotation matrix theory.

In simple words it tell us that if we want to calculate coordinates of point from global to local base I need to know:

  •  coordinates of point in global base
  •  position of local base origin in global base in order to calculate translation vector
  •  rotation of local base relative to global base in order to create rotation matrix

And then use this data to fill up mathematical equations in order to get coordinates of point in local base.

Position Calculation - rotation matrices


Position Calculation - homogeneous transformation


Methodology - how does Position_Calculation works?

My application need to take into consider position on 2D environment so the calculation for translation and rotation significantly simplify. There is only rotation in Z axis and translation on X-Y plane. Calculations of pixels/mm ratio, local base position and orientation are based on data from Background_Area_Configuration [1] module using data about markers position and distances between them. Data about object global position are deliver by Find_And_Classify_Objects [2]. After collecting all this information module is ready to start mathematical operations after filling matrices with proper data. To create matrix equations I use QGenericMatrix [3]. Resulting data are stored in the same type of container as the global position data, and will be used to create message in user main window and for creating robot communication frame.