Camera and robot control system and its automatic adaptation method based on semantic model
Technical field
The present invention relates to a kind of industrial cameras based on semantic model and robot control system and its automatic adaptation side
Method belongs to robot control field.
Background technique
Under the background in industrial 4.0 epoch, with going deep into for 2025 strategy of China's production, Robot industry market presents quick-fried
Fried formula growth, this be unable to do without NI Vision Builder for Automated Inspection, and machine vision is equivalent to elongator of the human vision on machine, allows
Man-machine collaboration becomes a reality.Robot industry wants to realize really intelligent and automation, it is necessary to have and precisely observe things
Ability can judge things, core of the industrial camera as NI Vision Builder for Automated Inspection, importance is self-evident well.
Traditional machine vision scheme, robot controller need that programming is fixed to the communication configuration and function of camera
Work, when there are when a large amount of random combines, need extremely cumbersome robotic programming to work for camera function;When camera function upgrades
When change, robot controller needs stop working, and programming is fixed to function and configuration again.If replacing different phases
Machine needs the function and configuration according to camera manufacturer, is specifically programmed for such camera, the software between different cameral
Do not have reusability.Traditional scheme influences efficiency, does not have flexibility, does not also meet intelligence manufacture theory.
" semantization " refers to that information can be studied and be collected to machine in the case where needing less human intervention, understands
Machine language is now widely used for internet area, using more in web, HTML transmission.Industrial control field exists each
Equipment data form is different, communication pattern is different, will cause the data acquisition for a system in this way, needs engineer
Know different data, format meaning etc., wastes vast resources.Semantization solves this problem, allows equipment Unify legislation, says
The same language, is more able to achieve and interconnects.
For the intelligentized demand of robot control field, is modeled based on semantization, have studied industrial camera and robot
The adaptive approach of control system, semantization description information, server and client side's automatic adaptation break through cumbersome Conventional visual
Fixed program, realizes software repeated usage, plug and play, and interconnection is of great significance to the development of Chinese intelligence manufacture.
Summary of the invention
For in existing vision prescription, there are weights cumbersome when mass communication configuration process and camera replacement or function renewal
New program work, the present invention provides a kind of industrial cameras based on semantic model and robot control system and its automatic adaptation
Method.It based on semantic model module, is described by semantization, realizes that automatic adaptation, plug and play, synchronized update improve work
Efficiency.
Present invention technical solution used for the above purpose is: camera and robot based on semantic model control
The automatic adaptation method of system establishes semantization model service end module, language in camera controller, robot controller respectively
Justiceization model client end module, by the semantic modeling of semantization model service end module and with semantization model client end
The automatic adaptation of industrial camera and robot control system is realized in the parsing of module, comprising the following steps:
Semantization model service end module carries out semantization description, writing address according to camera parameter and camera control commands
In the element in space, daughter element, parameter institutional framework and service list are then formed into XML file;
Semantization model client end module accesses the semantization model service end module in camera controller and obtains XML text
Part, parsing obtain camera parameter and camera control commands;By semanteme corresponding to required camera parameter and camera control commands
Change order and is sent to camera controller;
Semantization model service end module obtains semantization order, and camera controller executes behaviour corresponding to semantization order
Make, and feeds back robot information;Robot controller is controlled according to robot information.
The camera parameter includes camera shooting function, acquisition parameters adjusting, camera parameter information.
The parameter institutional framework includes the corresponding relationship of element, daughter element;Service list include element, daughter element it is interior
Hold.
It is described that semantization description is carried out according to camera parameter and control command, in the element in writing address space, daughter element
The following steps are included:
Using camera shooting function, acquisition parameters are adjusted, camera parameter information is as element writing address space;It will be each
The classification of element is respectively as the daughter element under affiliated element;Movement, that is, camera control commands of certain corresponding daughter element are as the son
Next stage daughter element under element.
The camera controller carries out corresponding command operation, and feed back robot information the following steps are included:
Camera controller executes shooting action according to semantization order, and obtains the corresponding location information of shooting result.
After feeding back robot information, robot controller resolves to obtain robot motion track according to location information, according to
Motion profile controls robot and executes grasping movement.
Camera and robot control system based on semantic model, build in camera controller, robot controller respectively
Vertical semantization model service end module, semantization model client end module, comprising:
Semantization model service end module is write for carrying out semantization description according to camera parameter and camera control commands
Enter in the element of address space, daughter element, parameter institutional framework and service list are then formed into XML file;Obtain semantization
Order makes camera controller execute operation corresponding to semantization order and feeds back robot information to robot controller;
Semantization model client end module, for accessing the semantization model service end module in camera controller and obtaining
XML file, parsing obtain camera parameter and camera control commands;It will be corresponding to required camera parameter and camera control commands
Semantization order is sent to the semantization model service end module of camera controller.
The present invention has the following advantages and beneficial effects:
1, automatic adaptation of the invention is not the robot controller and industrial camera for being directed to some specific model,
Adaptation method is suitable for all robot controllers and industrial camera equipped with semantization model module of the invention.
2, the characteristics of automatic adaptation of the present invention, robot control can not needed when camera function upgrades and changes
Device interruption of work, instead of the spirit for teaching machine manual modification camera function and communications command, increasing robot system work
Activity has been saved the working time, plug and play.
3, semantization model module of the present invention has been used based on service-oriented technology, do not depend on specific hardware platform and
Operating system, software have reusability, applied widely.
Detailed description of the invention
Fig. 1 is the embodiment block diagram for the hardware environment composition that the present invention applies;
Fig. 2 is controller semantization model module figure of the invention;
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and embodiments.
Referring to Fig. 1, industrial camera and robot control system based on semantization model, wherein relating generally to robot control
Device processed, camera controller, robot body.
The robot controller, is the X86-based platform for running QNX real time operating system, and hardware components include
Motion controller and servo-driver support EtherCAT bus communication.Software section include semantization model service end module,
Control algolithm module, sensor module, motion-control module;Control algolithm module, including basic algorithm library, function algorithm library and
Algorithm application using algorithms library, for robot control;Sensor module, including sensor hardware driving and data modulus of conversion
Type is interacted for robot with sensor.Motion-control module, including dynamics module, kinematics module, for parsing life
It enables, controls robot manipulation.
The camera controller includes semantization model client end module, communication configuration module, visual performance module;
Referring to fig. 2, the automatic adaptation core point of this patent is semantization model client end module and server module.It is semantic
Changing model service end module is to define the model of a kind of integrated address space and information based on semantic service-oriented module,
By information such as relevant all parameters of a specific object, mode of operation, history, events based on the mode of semantic modeling to right
As carrying out semantization description, relationship each other is established, the XML file of parameter institutional framework and service list is formed, can indicate multiple
Miscellaneous data structure and process, establishes network communication services end, and the binary protocol based on TCP completes data exchange.Described
Semantic modeling is to increase semantic description layer based on the basis of data modeling, described in the form of " data-semanteme-relationship ".Language
Justiceization model client end module is to be established the client of network communication based on semantic service-oriented module, accessed and taken by ID
Business device module obtains parameter institutional framework and service list based on semantization attribute information and XML file parsing.
By taking robot controller and industrial camera system as an example, detailed process includes: that industrial camera controller end establishes language
Justiceization model service end module, such as by the parameter information of camera: the function of shooting, the adjusting of acquisition parameters, camera basic letter
The parameters semantic modeling modes such as breath carry out semantization description, and in the element in writing address space, element includes element layer, daughter element
The hierarchical relationships such as layer establish connection between each element, form the XML file of parameter institutional framework and service list.Robot control
Semantization model client end module is established at device end, and client shakes hands to server-side initiation, establishes connection.Get parms institutional framework
And service list XML, based on element in semantic model parsing address space, the information of daughter element, the final information for obtaining camera
All data of model, to achieve the purpose that automatic adaptation.Robot controller is according to adaptation as a result, life will be controlled accordingly
Order is sent to camera controller, and camera controller executes the order sent, and location information is fed back to robot controller,
Robot controller executes crawl according to location information, in conjunction with control algolithm module, moving control module for controlling robot body
Order.
Automatic adaptation method example of the present invention explained below, the specific steps are as follows:
Step 1: camera controller establishes semantization model service end module, is based on semantic modeling, to the function of camera shooting
Can (such as shooting shape, identification color, store function), the adjustings of acquisition parameters (such as the time for exposure, focalize, shoot mould
Formula), the parameters such as the essential information (such as manufacturer, the date of production, maximum resolution) of camera carry out semantization description, write-in
In the element of address space, daughter element;Function and control command are illustrated: such as phase function shooting different shape and different face
Color, by color and shape semantization describe in element layer, such as round, rectangular, the color for including by shape include as red,
The semantizations such as yellow describe that control command is such as shot to the orders languages such as yellow is round, red is rectangular in respective daughter element layer
Justiceization is described in next stage daughter element layer.Then parameter institutional framework and service list are formed into XML file.
Step 2: semantization model client end module is arranged in robot controller, shakes hands to server-side initiation, establishes communication,
The institutional framework that gets parms and service list XML, based on element in semantic model parsing address space, the information of daughter element, most
All data of the information model of camera, corresponding step 1 citing are obtained eventually, such as by access, control knows that phase function is shot
Different shape and different colours and various control commands, so that controller and phase function achieve the purpose that automatic adaptation.
Step 3: robot controller is round according to function needs, such as shooting yellow, semantization model client end module
The circular semantization order of shooting yellow for being parsed semantic acquisition is sent to camera controller, camera controller order
Afterwards, visual performance module, which starts execution search matching scheduling algorithm, (has the circular template of such as yellow, constantly searches in camera controller
Rope illustrates to be matched to, can calculate the circular location information of yellow when the exactly yellow circle taken, gives machine
People's controller), when taking yellow circle, its location information is sent to robot controller.
Step 4: robot control calls control algolithm module to be resolved according to location information, obtains robot and executes
Track, moving control module for controlling mechanical arm execute crawl task.
In conclusion method of the invention is directed to the demand of industrial camera and robot control system automatic adaptation, propose
A kind of system and automatic adaptation method based on semantization model.This method flexibly controls industrial camera for robot controller and mentions
For convenience, plug and play does not depend on the controller and camera of specific model, and software has reusability, saves the working time, has
Conducive to the extension of multicamera system, it is able to achieve and interconnects from group decision.