CN108500978A - A kind of robot controller, method and robot - Google Patents

A kind of robot controller, method and robot Download PDF

Info

Publication number
CN108500978A
CN108500978A CN201810189449.5A CN201810189449A CN108500978A CN 108500978 A CN108500978 A CN 108500978A CN 201810189449 A CN201810189449 A CN 201810189449A CN 108500978 A CN108500978 A CN 108500978A
Authority
CN
China
Prior art keywords
ros
scheduler
robot
controller
coprocessor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810189449.5A
Other languages
Chinese (zh)
Other versions
CN108500978B (en
Inventor
高巍
张向东
董伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Inc
Original Assignee
Goertek Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Inc filed Critical Goertek Inc
Priority to CN201810189449.5A priority Critical patent/CN108500978B/en
Publication of CN108500978A publication Critical patent/CN108500978A/en
Application granted granted Critical
Publication of CN108500978B publication Critical patent/CN108500978B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • B25J9/161Hardware, e.g. neural networks, fuzzy logic, interfaces, processor
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J13/00Controls for manipulators

Abstract

The invention discloses a kind of robot controller, method and robots.The control device includes primary processor, coprocessor and one or more subtasks controller, and coprocessor includes the first libraries ROS lib for having ROS communication modules and ROS management modules;Primary processor, one or more subtasks controller are connect with coprocessor respectively;Coprocessor, for managing the task data that all subtask controllers are sent by ROS management modules;Pass through ROS communication modules, the task data of ROS message formats is sent to primary processor, and the control instruction for the ROS message formats generated according to task data that primary processor issues is received, it is controlled according to the management of ROS management modules, control instruction is distributed to corresponding subtask controller.Using the technical program, the processing time of message during robot control is saved, the burden of primary processor is reduced, ensures the real-time of robot control, improves the usage experience of user.

Description

A kind of robot controller, method and robot
Technical field
The present invention relates to robotic technology field, more particularly to a kind of robot controller, method and robot.
Background technology
As people in recent years increase the temperature that robot is paid close attention to, miscellaneous robot and correlation on the market Mating software and hardware platform is released successively.Robot system on the market can use robot manipulation (Robot at present Operating System, ROS) system conceptual design, use master, the design pattern of coprocessor.In this mode, main Processor runs linux system and ROS systems, and coprocessor runs bare machine program (the not program of tape operation system) or embedding in real time Embedded system (Real Time Operating System, RTOS).During robot controls, association's processing independent operating one A real time operating system is responsible for being reported to primary processor after acquiring the data of the correlation units such as chassis, motor and sensor, and The message format that ROS systems can identify, communication lattice main, between coprocessor are converted into after primary processor end is parsed Formula carries out two-way communication according to privately owned Design of Communication Interface, by serial ports or Ethernet.
Said program uses RTOS systems in coprocessor, is the real-time demand of robot control, but this processing Mode has still taken up a large amount of communication channel between master, coprocessor, in addition between proprietary data format and ROS message formats Conversion and linux system minimum operation unit itself inherent delay (generally in 10ms or so) so that this control mode Robot can not truly realize instant control.A large amount of data are transmitted over the communication channels simultaneously, meeting itself The concept of the bit error rate is introduced, the message capacity of the bit error rate and system is directly proportional in communication system, and more data gulp down measurement and can lead The higher bit error rate is caused, if introducing the link of coding and decoding in order to reduce the bit error rate, can also increase system cost, and New Time Delay of Systems problem, that is to say, that robot control program in the prior art can have system delay, can not The real-time for ensureing robot causes robot to execute corresponding operation slowly, influences the usage experience of user.
Invention content
In view of the above problems, it is proposed that a kind of robot controller, method and robot of the invention, to solve or It solves the above problems at least partly.
According to an aspect of the invention, there is provided a kind of robot controller, the control device include primary processor, Coprocessor and one or more subtasks controller, coprocessor include the first libraries ROS lib, the first ROS lib library Zhong Bao Include ROS communication modules and ROS management modules;Primary processor, one or more subtasks controller are connect with coprocessor respectively;
Coprocessor, for managing the task data that all subtask controllers are sent by ROS management modules;Pass through ROS communication modules, the task data of ROS message formats is sent to primary processor, and receive that primary processor issues according to task The control instruction for the ROS message formats that data generate, and controlled according to the management of ROS management modules, control instruction is issued To corresponding subtask controller.
According to another aspect of the present invention, provide a kind of robot control method, the robot include primary processor, Coprocessor and one or more subtasks controller, this method are applied in the coprocessor of robot, and this method includes:
The task data that one or more subtask controllers of robot are sent is received, to all subtask controllers The task data of transmission is managed, and the task data of ROS message formats is sent to primary processor;
The control instruction for the ROS message formats generated according to task data that primary processor issues is received, and will control Instruction is distributed to corresponding subtask controller.
According to a further aspect of the invention, a kind of robot is provided, which includes foregoing robot Control device.
In conclusion the advantageous effect of technical scheme of the present invention is:Coprocessor receives what subtask controller was sent Task data is unified to be carried out after managing and handling accordingly, carries out ROS communications with primary processor, coprocessor is directly to master Processor sends the task data of ROS message formats, and the control that can also directly receive the ROS message formats of primary processor refers to It enables, does not need the conversion of primary processor, save primary processor in the prior art and the message progress ROS that coprocessor is sent disappears Format conversion is ceased, and converts ROS control commands to the process of message format corresponding with the proprietary protocol of coprocessor, from And the processing time of message during robot control is saved, the burden of primary processor is reduced, treatment effeciency is improved, ensures machine The real-time of device people control, improves the usage experience of user.
Description of the drawings
Fig. 1 is a kind of illustrative view of functional configuration of robot controller provided by one embodiment of the present invention;
Fig. 2 is that a kind of subtask controller provided by one embodiment of the present invention handles the schematic diagram communicated with association;
Fig. 3 is a kind of schematic diagram of mutual exclusion backup operation provided by one embodiment of the present invention;
Fig. 4 is a kind of illustrative view of functional configuration for robot controller that another embodiment of the present invention provides;
Fig. 5 is a kind of flow diagram of robot control method provided by one embodiment of the present invention;
Fig. 6 is a kind of illustrative view of functional configuration of robot provided by one embodiment of the present invention.
Specific implementation mode
The present invention mentality of designing be:Robot primary processor carries out the control life of the processing of task data in the prior art The publication of order greatly reduces the treatment effeciency of task data, the libraries ROS lib is integrated in coprocessor in the present invention so that Coprocessor can share the processing of a part of task data, mitigate the burden of primary processor, to improve the processing of task data Efficiency.To make the object, technical solutions and advantages of the present invention clearer, embodiment of the present invention is made below in conjunction with attached drawing Further it is described in detail.
Fig. 1 is a kind of illustrative view of functional configuration of robot controller provided by one embodiment of the present invention.Such as Fig. 1 institutes Show, which includes primary processor 110, coprocessor 120 and subtask controller 131, subtask control Device 132, subtask controller 133, coprocessor 120 include the first libraries ROS lib, and the first libraries ROS lib include ROS communications Module and ROS management modules;Primary processor 110, subtask controller 131,132,133 are connect with coprocessor 120 respectively.
Coprocessor 120, for managing subtask controller 131, subtask controller 132, son by ROS management modules The task data that task controller 133 is sent;By ROS communication modules, appointing for ROS message formats is sent to primary processor 110 Business data, and receive the control instruction for the ROS message formats generated according to task data that primary processor 110 issues, Yi Jigen It is controlled according to the management of ROS management modules, control instruction is distributed to corresponding subtask controller.
Here ROS Lib are the basis of all ROS Client Libraries and tool, it includes common tool, Such as the generator and common message definition of message and service, such as title and daily record, it also include ROS Python nodes and The general purpose routine guidance code of tool can facilitate the stand alone software library for realizing ROS communications.In the prior art, coprocessor will After the data of acquisition are sent to primary processor, it is responsible for converting these data to ROS by the embedded ROS nodes on primary processor The process of message inherently brings huge delay, while in the prior art generally using serial ports as communication media, serial ports Communication is a kind of serial communication mode, and data are calculated and sent one by one according to minimum clock, the band of this communication mode Wide and baud rate is generally 115200bps (bits is per second), can not put up with mass data and carries out network transmission in synchronization, such as Fruit has a large amount of data transmission that certainly will occupy valuable Internet resources bandwidth, and generates network congestion, and typical phenomenon is just Data packetloss, data mess code, and the communication between robot coprocessor and main process task exactly mass data in same a period of time The transmission at quarter, so, in robot control, it is easy to appear will result directly in data inaccuracy or order for packet loss and mess code It can not normally parse, can not really meet the requirement of real-time of robot.
In addition, based on master in the prior art, coprocessor mode architecture design in, on harmonizing processor chip only transport Row bare machine program or RTOS systems, not integrated ROS Lib communication modules.Coprocessor acquires times of each sensor or motor Be engaged in data after, and according to master, coprocessor proprietary protocol specified in format, task data is organized into specific character string, It is sent to primary processor by itself serial ports or network interface, and is parsed on the host processor therewith, is needed thus ROS node communication nodes are individually added on primary processor, which is assigned to newly-increased mould ROS numbers in the block by the data after parsing It according in structure, and is released according to the unified message formats of ROS, that is to say, that all ROS Message Processings are at main place It manages device end to carry out, the processing of the not responsible ROS message of coprocessor.Therefore, introduced on communication mode during this two sets it is only Vertical communication system (a set of is the communication inside primary processor, and another set of is the communication of coprocessor and primary processor), two sets It needs to interact by conversion between communication mode, conversion between the two must consume system resource and occupy system operation Time, this is obviously unsuitable for the relatively high occasion of requirement of real-time, is unfavorable for message and obtains and publishes in real time.
ROS management modules, that is, ROS master modules, effect are mainly used for receiving and managing ROS message, registration or release ROS nodes, the frequency and the functions such as management service and call request that control message sends and subscribes to.In the present embodiment, it assists Processing includes the libraries ROS lib, and the libraries ROS lib include ROS master modules and ROS communication modules, group task controller After task data is sent to coprocessor, the ROS master modules of coprocessor can carry out pipe to the task data received Reason will be needed at primary processor after coprocessor carries out task distribution to the task data received by ROS communication modules After the task data of reason is processed into the task data of ROS message formats, it is then forwarded to primary processor, such primary processor is to receiving The task data Direct Recognition arrived, is converted to corresponding control instruction, and be directly handed down to coprocessor, according to ROS master The management of module controls, and the control instruction received is distributed in corresponding subtask controller by coprocessor.
As it can be seen that the technical solution of the present embodiment, communication inside primary processor and coprocessor and main process task are saved Message transformation in the communication of device, and then the processing time of message during robot control is saved, treatment effeciency is improved, is ensured The real-time of robot control, improves the usage experience of user.
It should be noted that the number of subtask controller shown in FIG. 1 is not limited to 3, one or more, example Such as, it 4, is set according to actual needs.
In one embodiment of the invention, subtask controller 131 shown in FIG. 1, subtask controller 132, son are appointed Controller 133 be engaged in including the 2nd libraries ROS lib, the 2nd libraries ROS lib include ROS communication modules.
Above-mentioned each subtask controller, it is for passing through the ROS communication modules in the 2nd libraries ROS lib, machine is artificial The task data for making to acquire in the process is converted into the task data of ROS message formats, and is sent to coprocessor.
Traditional ROS communication modes are that each specific processing task is all abstracted as independent subtask or child node Run, the foundation of each independent subtask is required to meet the message format of ROS communications, they issue or subscribe to from The relevant message of body or theme, and the nodal information of itself and ROS Master nodes are registered, after completing to register, The message of node itself will be distributed to each node for needing to subscribe to this message via ROS Master.
In the present embodiment, the libraries ROS Lib are integrated on each subtask controller to realize that independently operated son is appointed Business can variable body become ROS nodes so as to independent operating.After such mode, the subtask run on coprocessor is just ROS communications can be carried out as using common ROS nodes.In other words, each subtask can be used as a ROS node, All nodes using the design of ROS communication constructions can freely issue the theme message of respective task, and between each other may be used To subscribe to the interested task message of oneself task, being truly realized links, each takes what he needs, is avoided in this way at main place The step for the type of message that ROS can be identified is then converted to after needing the task data for acquiring coprocessor to be parsed on reason device Suddenly, while response time of whole system is also increased.
Meanwhile each subtask can be communicated as a ROS node with coprocessor in the present embodiment, be embodied logical The framework of " star " network communication in letter system.Each subtask controller behind the libraries integrated ROS Lib, can realize at association The point-to-point communication of device is managed, the advantage of this communication construction is:1) communication control of star network is the simplest and direct.Such as It is designed using loop network, after a node communication failure, entire looped network communication will lose annular link (each node concatenation Composition), cause whole system to will be unable to normal communication.And if by the way of mesh network communications, this scheme is for large size There is significant advantage for the communication of mesh networks and a node up to a hundred, be typically applied in it is large-scale and intercity between network communication, it is right It is expensive and unrealistic using such scheme for small-scale robot field.2) failure of star network is easy Diagnosis, and it is easily separated problem, due to the equal independent operating of each node, once some node generation independent failure can be quick Fault point, the node to break down is unlikely to influence the normal work of whole system, particularly with some for non real-time The more demanding node of property, this failure will not even influence the normal work of whole system.3) the method can facilitate earthquake State is added based on the ROS sensors designed or controller, by means of the function in the libraries ROS Lib, if it is desired to increasing in existing system Add novel sensor or controller, it is only necessary to issue the data of sensor or controller according to the message format of ROS, such as Fruit is the prior art, it is also necessary to the individually service code of change coprocessor and processing logic, and need to open up new net thus Network bandwidth.
Fig. 2 is that a kind of subtask controller provided by one embodiment of the present invention handles the schematic diagram communicated with association.Such as Fig. 2 Shown, unit 1 is primary processor, and unit 2 is coprocessor (including main task management and scheduler, backup tasks management and tune Spend device, and the libraries ROS Lib with ROS master modules and ROS communication modules), the control of 4 power management subtask of unit Collect in device, 7 motor subtask controller of 5 safe subtask controller of unit, 6 sense signals task controller of unit and unit At there are the libraries ROS Lib, independent ROS communications are carried out with 2 coprocessor of unit, are formed between subtask controller and coprocessor " star " network.
In one embodiment of the invention, coprocessor 120 include master scheduler and from scheduler, master scheduler and from Scheduler respectively includes the first libraries ROS lib.Master scheduler and from scheduler by the way of mutual exclusion backup operation and main process task Device is communicated.
The data for using coprocessor acquisition sensor in the prior art, control starting or stoping for motor, and will adopt Either control signal is sent to main place to collection according to certain data format by serial ports RS232 or similar cable port mode Reason device resolved or handled, primary processor be converted into after being parsed according to privately owned communication format ROS systems theme or Message format releases.In the entire system, there are two node operations and the relevant node work(of ROS for practical of primary processor Can, remaining ROS node of ROS Master node administrations and as network routing function, it is responsible for ordering for ROS task programs It reads, the theme or message that publisher node operation is required, once coprocessor breaks down for some reason, in primary processor Embedded ROS nodes will be unable to obtain the data relied on when system operation, this will lead to system operation mistake so that robot It can not work normally.So the stability of the not guaranteed robot control of the scheme of the prior art.
In the present embodiment, coprocessor includes master scheduler and from scheduler, and principal and subordinate is used in ROS scheduling portions Backup, the robustness of system is improved, out of service when will not meet failure because of the ROS schedulers of coprocessor are prominent, Even if main task scheduler is abnormal because of certain reason, it can be immediately performed backup operation from task dispatcher, ensure that whole A ROS systems do not interrupt.At some for the higher occasion of security requirement, this Redundancy Design in the present embodiment It can play an important role, for example, in robot field etc. emphasizes the security and stability of whole system, for motor and machine The control of the key modules such as tool arm.
Specifically, above-mentioned mutual exclusion backup operation includes:
For master scheduler, when master scheduler is run, is locked to the process of master scheduler own system, start master scheduling ROS management modules in first libraries ROS lib of device and the operation of ROS communication modules;When master scheduler operation exception, master is terminated ROS management modules in scheduler and the operation of ROS communication modules, allow unlocking signal to being discharged from scheduler;
For from scheduler, when master scheduler is run, if permission can not be got in preset times or preset time When unlocking signal, into standby listening state, when listening to permission unlocking signal, and the ROS management modules in master scheduler and It when ROS communication modules run abort, is locked to from the process of scheduler own system, starts the first ROS lib from scheduler ROS management modules in library, and start from the ROS communication modules operation in the first libraries ROS lib of scheduler;When from scheduler When operation exception, terminate from scheduler ROS management modules and ROS communication modules operation, to master scheduler release allow to solve Lock signal.
Fig. 3 is a kind of schematic diagram of mutual exclusion backup operation provided by one embodiment of the present invention.As shown in figure 3, ROS tasks When management and scheduler 1 (i.e. master scheduler) operation, the locking signal of scheduler 1 is sent, the process of 1 own system of scheduler is given It locks, starts the ROS master modules in the oneth libraries ROS lib of scheduler 1, start in the oneth libraries ROS lib of scheduler 1 ROS communication modules are run;Judge whether communication is abnormal, if normally, continuing to communicate;If abnormal, it is determined that be scheduler 1 Operation exception allows to be switched to scheduler 2, release scheduling at this point, terminating ROS master modules and the operation of ROS communication modules The lock signal (allowing unlocking signal) of device 2.Task management and scheduler 2 (i.e. from scheduler), when scheduler 1 is run, if When can not get the lock signal of scheduler 2 in preset times or preset time, into standby listening state, dispatched when listening to The lock signal of device 2, and when ROS master modules in scheduler 1 and ROS communication modules run abort, give scheduler 2 itself The process of system locks, and starts the ROS master modules in the oneth libraries ROS lib of scheduler 2, starts the oneth ROS of scheduler 2 ROS communication modules operation in the libraries lib;Judge whether communication is abnormal, if normally, continuing to communicate;If abnormal, it is determined that Allow to be switched to scheduler 1 at this point, terminating ROS master modules and the operation of ROS communication modules for 2 operation exception of scheduler, The lock signal (allowing unlocking signal) for discharging scheduler 1, starts work by scheduler 1.
It should be noted that when scheduler 1 is run, the lock signal (locking signal) of the scheduler 1 of transmission can make Scheduler 2 can not access the code area in program, and scheduler 2 can only wait for the lock signal for getting oneself (unlock to be allowed to believe Number or unlocking signal) when can just start operation;Likewise, when scheduler 2 is run, the locking signal meeting of the scheduler 2 of transmission So that scheduler 1 can not access the code area in program, scheduler 1, which can only also wait for, to be got the unlocking signal of oneself and can just open Dynamic operation.
Such mutually exclusive operation not only maintains the ROS Master uniqueness in coprocessor, and ensure that ROS systems The function of node scheduling management in system is not interrupted, and is ensured that the continuity of entire node communication, is ensured the stabilization of system Property.
In one embodiment of the invention, robot further includes camera module;
Camera module is connect with the primary processor 110 of control device 100 shown in FIG. 1, for acquire camera Image is sent to primary processor.Primary processor 110, the image received for identification, and generated accordingly according to recognition result Avoidance obstacle instructs, and is handed down to coprocessor.
Although running RTOS systems in coprocessor, simple task data can only be handled, to ensure real-time, but Be complex data processing also need to primary processor completion, for example, image data.In the present embodiment, camera module directly connects Primary processor is connect, so that primary processor can be handled timely, and is not the transmission for carrying out data by coprocessor, It is further ensured that the real-time of robot control.
In one embodiment of the invention, control device 100 shown in FIG. 1 further includes communication retransmitting station module, at association Reason device 120 is connect by communication retransmitting station module with primary processor.
Robot further includes laser radar module, handling module and expansion module;Laser radar module, handling module and expansion Module is opened up to connect by the primary processor of communication retransmitting station module and control device respectively.
Wherein, communication retransmitting station module, including ROS TCP/IP serial ports and ROS serial serial ports.
Expansion module, for providing the one or more expansion interfaces for accessing robot for external equipment.
Communication retransmitting station mould ROS TCP/IP communications in the block are suitble to high speed big data quantity communication, in view of swashing for current main-stream Optical radar and robotic gripping device all use the communication mode of TCP/IP, generate a large amount of data in the process of running and hand over Mutually, the peak transfer rate of the communication modes such as traditional serial communication or RS485 cannot be satisfied the requirement of traffic rate.Meanwhile ROS Serial serial communication interfaces have been reserved for the communication (such as sending some simple control instructions) of small data quantity, this Sample prescription other module expanding communications use.At the same time, communication retransmitting station connects expansion module, for robot control dress Extension is set to use, for example, being reserved on the extended interface unit, HDMI is shown, JoyStick handles control and usb expansion interface, The access for facilitating external equipment ensures that the mainstream equipment in robot field can be directly accessed the control device of robot.
In one embodiment of the invention, subtask controller shown in FIG. 1 includes below one or more:Power supply Manage subtask controller;Safe subtask controller;Sense signals task controller;Motor subtask controller.
Fig. 4 is a kind of illustrative view of functional configuration for robot controller that another embodiment of the present invention provides.Such as Fig. 4 It is shown:
Module 1 is that primary processor is transported on this basis using the computer of the miniPC high-performance x86 frameworks of Intel Company Row Ubuntu Linux and ROS systems.Module 1 is physically connected to 10 (Prime of RGBD depth cameras head module by USB interface Sense Carmine, 3D+Color data), this equipment is used to acquire the deep image information of external environment, and image is converted The local barrier avoiding function of robot is used for for cloud information.Module 2 is coprocessor, using 2 ST Microelectronics STM32F767 chips, this chips use cortex M7 kernels, dominant frequency to reach 218Mhz, are suitble to operation real time operating system, Association's controller operation III embedded real-time operating systems of UCOS- simultaneously add ROS Lib library files so that the module can be used as only Vertical ROS nodes use, and mutual exclusion runs ROS Master management nodes on this basis.Communication between master-slave controller passes through One communication retransmitting station module 3 (docker) realizes that this repeater station is integrated with ROS TCP/IP and ROS Serial serial ports work( Energy.Laser radar module 8 (Sick TIM571/Hokuyo UST30-LX) and robotic gripping device module 9 are turned by communication Hair station module 3 is connect with module 1.Meanwhile communication retransmitting station module 3 connects expansion module 11, this part is controlled for robot Device extension design uses, and high-definition multimedia HDMI display interfaces, JoyStick handles have been reserved on expansion module 11 Control interface, Gigabit Ethernet gigabit ethernet interfaces and USB interface, facilitate the extension of peripheral hardware, now in machine The mainstream equipment in device people field can be directly accessed robot controller and control.
Module 2 is coprocessor, is integrated with main task management and scheduler (master scheduler), backup tasks management and scheduling Device (from scheduler).Main task management and scheduler, backup tasks management and scheduler are two pieces of embedded chips (STM32F767), UCOS- III and software mutually exclusive operation are run in two chips, and two chips are integrated with the libraries ROS Lib Function, but every time can only one ROS Master node of independent operating, this node is used to manage remaining node in ROS networks Interactive communication.After module 2 integrates ROS functions, this module 2 can directly be issued by ROS corresponding module theme and Message utilizes the communication of ROS ICP/IP protocols with module 1.Surrounding is connected to several subtask controller modules, is electricity respectively Source control subtask controller module 4, safe subtask controller module 5, sense signals task controller module 6 and motor Subtask controller module 7, above-mentioned several modules are physically connected to module 2.
Power management subtask controller 4 is using low cost S TM32F103Cortex M3 kernels as controller, the mould Block is as the function of measuring cell voltage and automatic obstacle avoiding on robot controller, the main output voltage for sampling lead-acid battery And output current, the module is for connecting high precision electro pressure sensor and high precision electric current transducer.High precision electro pressure sensor Tank voltage for detecting lead-acid battery, when cell voltage less than to a certain degree when, such as less than the 40% of total capacitance When, electricity low signal can be sent out, informs that robot needs charging in time, to realize recharging.High precision electric current transducer is used In the electric current of detection battery discharge, if because overcurrent situations, current sensor occur for certain reason in robot circuit Alarm signal can be sent out to from controller, the signal can be responded from controller and be operated with emergency stops robot, protect robot In important component do not caused to damage by high current constant impingement, while the module is integrated with ROS communication functions (ROS Lib Library), publication meets the Batts/msg message of ROS message formats.
Safe subtask controller 5 also uses STM32F103 chips, mainly as security strategy control in robot system System, this module can stop for some safety sensors of physical connection when meeting some emergencies so that robot is prominent immediately And acquisition related security policies, mainly cover breaker (breaker), electromagnetic brake system, self- recoverage insurance, crash sensor With indicator light etc..The wherein size of current of breaker and self- recoverage insurance for each branch in limiting circuit, when electric in circuit When stream is obtained more than tolerance value, load circuit is disconnected automatically, to protect load from high current constant impingement.Electromagnetic brake module Emergency stop function in being controlled for motor, when motor can not receive halt instruction due to emergency case, in order to avoid motor Potential hazard caused by operation, needs to stop motor operation immediately, at this time can be (several in a short time using locking system It is delicate) stop motor operating.Crash sensor is used for when relied on sensor does not detect machine in some cases for robot Obstacle information on device people's traffic direction, after robot is contacted with Barrier Physical, crash sensor can send out digital quantity letter Number to from controller, urgent Robot dodge strategy will be taken immediately after receiving signal from controller, stops robot operation or original place rotation Turn certain angle avoiding barrier.Indicating lamp module is identified usually using light bar as instruction robot operating status, in we Robot is indicated just in normal operating condition with green constant in case, and red flicker indicates that robot encounters barrier, and It calculates and the process of processing, the module is integrated with ROS communication functions (libraries ROS Lib), publication meets the IO/ of ROS message formats Msgs message.
Sense signals task controller 6 using STM32F103Cortex M3 kernels be used as controller, robot needs according to It is perceived extraneous " information " by various sensor assemblies.The module is connected to several important sensor assemblies:IMU, ultrasound Wave sensor and infrared sensor pass through IIC communication mode physical connections 9DOF sensors (acceleration, gyroscope and magnetic force Meter) sensor, obtain the angle information of deflection, while the also physical connection ultrasonic wave of module 6 during the motion for robot The sensor of the single-points ranging class such as sensor, infrared sensor, for perceive the point of each azran barrier of robot away from From information, the more accurate local barrier avoiding function of point of robot may be implemented by these sensors, this module also inherits ROS communication functions (libraries ROS Lib) issue the sensor/msgs message of ROS message formats.
Motor subtask controller 7 also uses STM32F103 chips, and reality is physically connected to by CAN-BUS communication modes Border motor-drive circuit, the motion control instruction sent out by receiving miniPC modules, practical control is converted by driving circuit The analog signals (0~5Vdc) of motor speed processed are to control the running speed of motor.Meanwhile the motor subtask controller 7 It is also connect with luminous point encoder 1 and photoelectric encoder 2, when motor operates, the Hall code detection module carried on motor will Umber of pulse (the note generated on the encoder in the unit interval when feedback real electrical machinery operation:The number and motor of feedback pulse number Running speed proportional), the umber of pulse after feedback passes through actual to acquire from the interruption detection mode on controller The umber of pulse generated in unit interval, then by left and right wheels umber of pulse respectively by CAN-BUS bus feedbacks to from controller, The photoelectric encoder 1 of revolver and 2 data of photoelectric encoder of right wheel are used to calculate the practical mileage number of motor operation, this ROS mould Block node issues the message of cmd/vel.
It, can by the way of individually adding the libraries ROS Lib in the processor in each subtask module in the present embodiment The demand of remaining related subtask of extension is greatly facilitated, third party's hardware can arbitrarily add on the basis of the libraries Lib ROS Add, and can be identified immediately by ROS systems, and eliminates and convert privately owned control protocol to general ROS type of messages Step, effectively reduces transmission and the conversion link of M signal, while also effectively reducing the task burden of primary processor.It is right For communication system, a large amount of data transmission will introduce the bit error rate, this probability is directly proportional to the quantity of transmission data, subtracts Few data transmission and the intermediate link of conversion can effectively reduce the generation of the bit error rate so that the design of this system more efficiently and Safety.By test, control device in the technical program can reach per second 100 for the control process speed of motor~ 200Hz, and system can ensure stable operation in this rate, it is that can not ensure that such treatment efficiency, which is using the prior art, 's.Simultaneously for the not high equipment of some requirement of real-time, response priority can be suitably reduced, control frequency is set as 1~5Hz is per second, can save the valuable high-level vital task of communication resource priority processing in this way.
Fig. 5 is a kind of flow diagram of robot control method provided by one embodiment of the present invention, and robot includes Primary processor, coprocessor and one or more subtasks controller.This method is applied in the coprocessor of robot.Such as figure Shown in 5, this method includes:
Step S510 receives the task data that one or more subtask controllers of robot are sent, to all sons The task data that task controller is sent is managed, and the task data of ROS message formats is sent to primary processor.
Step S520 receives the control instruction for the ROS message formats generated according to task data that primary processor issues, with And control instruction is distributed to corresponding subtask controller.
Specifically, coprocessor includes the first libraries ROS lib, and the first libraries ROS lib include ROS communication modules and ROS Management module receives the task data that one or more subtask controllers of robot are sent, and is managed by ROS management modules The task data of reception.By ROS communication modules, the task data of ROS message formats is sent to primary processor.Receive main process task The control instruction for the ROS message formats generated according to task data that device issues is controlled according to the management of ROS management modules, will Control instruction is distributed to corresponding subtask controller.
In one embodiment of the invention, coprocessor includes master scheduler and from scheduler.Method shown in fig. 5 into One step includes:
It master scheduler and is communicated from scheduler with primary processor by the way of mutual exclusion backup operation, it is standby using mutual exclusion Part operation mode include:When master scheduler is run, locks, forbid from scheduler solution to the process of master scheduler own system Lock allows unlocking signal when master scheduler operation exception to being discharged from scheduler;In master scheduler operational process, from tune If degree device can not be got in preset times or preset time when allowing unlocking signal, into standby listening state, work as monitoring To unlocking signal is allowed, is locked to from the process of scheduler own system, master scheduler is forbidden to unlock, it is different when being run from scheduler Chang Shi, being discharged to master scheduler allows unlocking signal.
Specifically, master scheduler and the first libraries ROS lib are respectively included from scheduler.Master scheduler and from scheduler use The mode of mutual exclusion backup operation is communicated with primary processor.
Above-mentioned includes by the way of mutual exclusion backup operation:
For master scheduler, when master scheduler is run, is locked to the process of master scheduler own system, start master scheduling ROS management modules in first libraries ROS lib of device and the operation of ROS communication modules;When master scheduler operation exception, master is terminated ROS management modules in scheduler and the operation of ROS communication modules, allow unlocking signal to being discharged from scheduler;
For from scheduler, when master scheduler is run, if permission can not be got in preset times or preset time When unlocking signal, into standby listening state, when listening to permission unlocking signal, and the ROS management modules in master scheduler and It when ROS communication modules run abort, is locked to from the process of scheduler own system, starts the first ROS lib from scheduler ROS management modules in library and the operation of ROS communication modules;When from scheduler operation exception, terminate from the ROS pipes in scheduler Module and the operation of ROS communication modules are managed, being discharged to master scheduler allows unlocking signal.
Fig. 6 is a kind of illustrative view of functional configuration of robot provided by one embodiment of the present invention.As shown in fig. 6, the machine Device people 600, including robot controller 610 as shown in Figure 1 or 2.
It should be noted that each embodiment of the method and robot shown in fig. 6 described in Fig. 5 and device shown in FIG. 1 Each embodiment correspond to identical, be described in detail above, details are not described herein.
In conclusion the advantageous effect of technical scheme of the present invention is:Coprocessor receives what subtask controller was sent Task data is unified to be carried out after managing and handling accordingly, carries out ROS communications with primary processor, coprocessor is directly to master Processor sends the task data of ROS message formats, and the control that can also directly receive the ROS message formats of primary processor refers to It enables, does not need the conversion of primary processor, save primary processor in the prior art and the message progress ROS that coprocessor is sent disappears Format conversion is ceased, and converts ROS control commands to the process of message format corresponding with the proprietary protocol of coprocessor, from And the processing time of message during robot control is saved, the burden of primary processor is reduced, treatment effeciency is improved, ensures machine The real-time of device people control, improves the usage experience of user.
The above description is merely a specific embodiment, under the above-mentioned introduction of the present invention, those skilled in the art Other improvement or deformation can be carried out on the basis of the above embodiments.It will be understood by those skilled in the art that above-mentioned tool Body description only preferably explains that the purpose of the present invention, protection scope of the present invention should be subject to the protection scope in claims.

Claims (10)

1. a kind of robot controller, the control device includes primary processor, coprocessor and one or more subtasks Controller, which is characterized in that the coprocessor includes the first libraries ROS lib, and the libraries the first ROS lib include ROS logical Interrogate module and ROS management modules;The primary processor, one or more subtask controller respectively with the coprocessor Connection;
The coprocessor, for managing the task that all subtask controllers are sent by the ROS management modules Data;By the ROS communication modules, the task data of ROS message formats is sent to the primary processor, and receives institute The control instruction for the ROS message formats generated according to the task data that primary processor issues is stated, and is managed according to the ROS The management control for managing module, corresponding subtask controller is distributed to by the control instruction.
2. control device as described in claim 1, which is characterized in that each subtask controller includes the 2nd ROS The libraries lib, the libraries the 2nd ROS lib include ROS communication modules;
The subtask controller, it is for passing through the ROS communication modules in the libraries the 2nd ROS lib, robot is worked The task data acquired in journey is converted into the task data of ROS message formats, and is sent to the coprocessor.
3. control device as described in claim 1, which is characterized in that the coprocessor includes master scheduler and from scheduling Device, the master scheduler and described respectively includes the libraries the first ROS lib from scheduler;
It the master scheduler and described is communicated from scheduler with the primary processor by the way of mutual exclusion backup operation.
4. control device as claimed in claim 3, which is characterized in that the mutual exclusion backup operation includes:
For master scheduler, when the master scheduler is run, is locked to the process of the master scheduler own system, start institute State the ROS management modules in the first libraries ROS lib of master scheduler and the operation of ROS communication modules;When the master scheduler is run When abnormal, the ROS management modules in the master scheduler and ROS communication modules operation are terminated, is released to described from scheduler Put permission unlocking signal;
For from scheduler, when the master scheduler is run, if permission can not be got in preset times or preset time When unlocking signal, into standby listening state, when listening to the permission unlocking signal, and it is described in the master scheduler When ROS management modules and the ROS communication modules run abort, locks, start from the process of scheduler own system to described ROS management modules in the first libraries ROS lib from scheduler and the operation of ROS communication modules;It is transported from scheduler when described When row is abnormal, the ROS management modules from scheduler and ROS communication modules operation are terminated, to the master scheduler Release allows unlocking signal.
5. control device as described in claim 1, which is characterized in that the robot includes camera module;
The camera module is connect with the primary processor of the control device, and the image that camera acquires is sent to the master Processor;
The primary processor, the image received for identification, and corresponding avoidance obstacle is generated according to recognition result and is instructed, under Issue the coprocessor.
6. control device as described in claim 1, which is characterized in that the control device further includes communication retransmitting station module, The coprocessor is connect by the communication retransmitting station module with the primary processor;
The robot further includes laser radar module, handling module and expansion module;The laser radar module, the crawl Module and the expansion module are connect by the communication retransmitting station module with the primary processor respectively;Wherein, the communication Repeater station module, including ROS TCP/IP serial ports and ROS serial serial ports, the expansion module, for providing for external equipment Access one or more expansion interfaces of robot.
7. robot controller as described in claim 1, which is characterized in that the subtask controller includes below one Kind is a variety of:
Power management subtask controller;
Safe subtask controller;
Sense signals task controller;
Motor subtask controller.
8. a kind of robot control method, the robot includes primary processor, coprocessor and one or more subtask controls Device processed, which is characterized in that the method is applied in the coprocessor of robot, the method includes:
The task data that one or more subtask controllers of robot are sent is received, to all subtask controllers The task data of transmission is managed, and the task data of ROS message formats is sent to primary processor;
The control instruction for the ROS message formats generated according to the task data that the primary processor issues is received, and will The control instruction is distributed to corresponding subtask controller.
9. method as claimed in claim 8, which is characterized in that the coprocessor includes master scheduler and from scheduler, institute The method of stating further comprises:
The master scheduler and it is described communicated from scheduler with the primary processor by the way of mutual exclusion backup operation, institute It states and includes by the way of mutual exclusion backup operation:
It when the master scheduler is run, locks, forbids described from scheduler solution to the process of the master scheduler own system Lock allows unlocking signal when the master scheduler operation exception to described discharged from scheduler;It is run in the master scheduler In the process, if described can not get in preset times or preset time from scheduler when allowing unlocking signal, entrance is standby Listening state locks from the process of scheduler own system to described when listening to the permission unlocking signal, forbids the master Scheduler unlocks, and when the operation exception from scheduler, being discharged to the master scheduler allows unlocking signal.
10. a kind of robot, which is characterized in that the robot includes such as claim 1-7 any one of them robot control Device processed.
CN201810189449.5A 2018-03-08 2018-03-08 Robot control device and method and robot Active CN108500978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810189449.5A CN108500978B (en) 2018-03-08 2018-03-08 Robot control device and method and robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810189449.5A CN108500978B (en) 2018-03-08 2018-03-08 Robot control device and method and robot

Publications (2)

Publication Number Publication Date
CN108500978A true CN108500978A (en) 2018-09-07
CN108500978B CN108500978B (en) 2021-04-30

Family

ID=63377166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810189449.5A Active CN108500978B (en) 2018-03-08 2018-03-08 Robot control device and method and robot

Country Status (1)

Country Link
CN (1) CN108500978B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109557854A (en) * 2018-12-07 2019-04-02 江西洪都航空工业集团有限责任公司 A kind of electric machine controller based on publish-subscribe model
CN110238850A (en) * 2019-06-13 2019-09-17 北京猎户星空科技有限公司 A kind of robot control method and device
CN110399215A (en) * 2019-06-25 2019-11-01 苏州浪潮智能科技有限公司 A kind of coprocessor, a kind of electronic equipment and a kind of data processing method
CN110764511A (en) * 2019-11-13 2020-02-07 苏州大成有方数据科技有限公司 Mobile robot with multi-sensor fusion and control method thereof
CN110908805A (en) * 2019-11-29 2020-03-24 深圳前海达闼云端智能科技有限公司 Information distribution method, robot and storage medium
CN111385321A (en) * 2018-12-28 2020-07-07 深圳市优必选科技有限公司 Node response method and system and robot
CN111496774A (en) * 2019-01-31 2020-08-07 大族激光科技产业集团股份有限公司 Robot distributed control system and method thereof
CN111583622A (en) * 2020-04-28 2020-08-25 南方电网数字电网研究院有限公司 Metering information distribution processing system and method of double-core intelligent ammeter management unit
CN112561298A (en) * 2020-12-09 2021-03-26 深圳市优必选科技股份有限公司 Robot battery management method, device, control equipment and storage medium
CN115242461A (en) * 2022-06-30 2022-10-25 中国人民解放军63891部队 ROS safety test system and method for robot operating system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242310A (en) * 2008-03-21 2008-08-13 北京佳讯飞鸿电气股份有限公司 A master-slave switching method for communication interface board
CN106914904A (en) * 2017-03-17 2017-07-04 华中科技大学 A kind of complex-curved blade force-location mix control system of processing based on ROS
US20170203436A1 (en) * 2014-07-08 2017-07-20 Hongxing Wei Robotic hybrid system application framework based on multi-core processor architecture
CN107168161A (en) * 2017-05-25 2017-09-15 电子科技大学 EtherCAT master-salve station communication systems based on ROS systems
CN107471229A (en) * 2017-09-30 2017-12-15 江西洪都航空工业集团有限责任公司 A kind of Edutainment robot based on ROS frameworks
CN206883638U (en) * 2017-03-28 2018-01-16 深圳光启合众科技有限公司 Robot control system and robot

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242310A (en) * 2008-03-21 2008-08-13 北京佳讯飞鸿电气股份有限公司 A master-slave switching method for communication interface board
CN101242310B (en) * 2008-03-21 2010-09-08 北京佳讯飞鸿电气股份有限公司 A master-slave switching method for communication interface board
US20170203436A1 (en) * 2014-07-08 2017-07-20 Hongxing Wei Robotic hybrid system application framework based on multi-core processor architecture
CN106914904A (en) * 2017-03-17 2017-07-04 华中科技大学 A kind of complex-curved blade force-location mix control system of processing based on ROS
CN206883638U (en) * 2017-03-28 2018-01-16 深圳光启合众科技有限公司 Robot control system and robot
CN107168161A (en) * 2017-05-25 2017-09-15 电子科技大学 EtherCAT master-salve station communication systems based on ROS systems
CN107471229A (en) * 2017-09-30 2017-12-15 江西洪都航空工业集团有限责任公司 A kind of Edutainment robot based on ROS frameworks

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109557854A (en) * 2018-12-07 2019-04-02 江西洪都航空工业集团有限责任公司 A kind of electric machine controller based on publish-subscribe model
CN109557854B (en) * 2018-12-07 2021-07-30 江西洪都航空工业集团有限责任公司 Motor controller based on publish-subscribe mode
CN111385321A (en) * 2018-12-28 2020-07-07 深圳市优必选科技有限公司 Node response method and system and robot
CN111496774A (en) * 2019-01-31 2020-08-07 大族激光科技产业集团股份有限公司 Robot distributed control system and method thereof
CN110238850A (en) * 2019-06-13 2019-09-17 北京猎户星空科技有限公司 A kind of robot control method and device
CN110399215A (en) * 2019-06-25 2019-11-01 苏州浪潮智能科技有限公司 A kind of coprocessor, a kind of electronic equipment and a kind of data processing method
CN110764511A (en) * 2019-11-13 2020-02-07 苏州大成有方数据科技有限公司 Mobile robot with multi-sensor fusion and control method thereof
CN110908805A (en) * 2019-11-29 2020-03-24 深圳前海达闼云端智能科技有限公司 Information distribution method, robot and storage medium
CN111583622A (en) * 2020-04-28 2020-08-25 南方电网数字电网研究院有限公司 Metering information distribution processing system and method of double-core intelligent ammeter management unit
CN111583622B (en) * 2020-04-28 2021-01-22 南方电网数字电网研究院有限公司 Metering information distribution processing system and method of double-core intelligent ammeter management unit
CN112561298A (en) * 2020-12-09 2021-03-26 深圳市优必选科技股份有限公司 Robot battery management method, device, control equipment and storage medium
CN112561298B (en) * 2020-12-09 2023-10-13 深圳市优必选科技股份有限公司 Robot battery management method, apparatus, control device and storage medium
CN115242461A (en) * 2022-06-30 2022-10-25 中国人民解放军63891部队 ROS safety test system and method for robot operating system
CN115242461B (en) * 2022-06-30 2023-08-25 中国人民解放军63891部队 ROS safety test system and method for robot operating system

Also Published As

Publication number Publication date
CN108500978B (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN108500978A (en) A kind of robot controller, method and robot
CN102227122B (en) Platform-independent protocol modularized system
CN106253487B (en) Intelligent electric power server applied to intelligent substation Protection control system
CN104345717B (en) Intelligent remote data acquisition system based on Internet of Things
CN104426950B (en) A kind of electric power Internet of Things intelligent communication method and system and intelligence communication gateway
EP3301783B1 (en) Protection and control system for intelligent substation based on industrial internet architecture
CN103343681B (en) The integrated double loop network coupling control system of rig based on IPC and PLC
CN104753085A (en) Remote online monitoring system for distributed photovoltaic access
CN103064377A (en) Third generation telecommunication (3G) dual-redundancy control system of police mobile robot
CN101109951A (en) Transforming plant intelligent electronic equipment access system
CN106452563A (en) Unmanned aerial vehicle (UAV) data link universal access system based on communication satellites
CN202616878U (en) Intelligent transformer station video linkage monitoring system based on internet of things
CN103347024A (en) Method and device for conversion of elevator communication protocols
US20130315362A1 (en) Nuclear digital instrumentation and control system
CN202735787U (en) Electric power information machine room environment real-time monitoring system
CN108287519B (en) Logical construction and implementation method for proton therapy equipment safety interlocking
CN207408770U (en) General Internet of Things centralized monitoring system
CN101394467B (en) Intelligent main control system for reinforcement digital video monitoring terminal system
CN107947365A (en) A kind of measure and control device for supporting intelligent substation multi-compartment concentrated collection to control and centralized observing and controlling networking
CN113766026B (en) Data processing method and system applied to energy industrial network
CN103683506A (en) Comprehensively-integrated linkage safety system of power system transformer substations
CN103294025A (en) Intelligent management and control system and method of energy consumption of internet of things
CN202034973U (en) Power line carrier terminal equipment and firefighting emergency evacuation lighting intelligent system of power line carrier terminal equipment
JP2013047946A (en) Computer network based hazardous condition monitoring system and hazardous condition processing server
CN207573084U (en) A kind of measure and control device that intelligent substation multi-compartment concentrated collection is supported to control and centralized observing and controlling networking

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant