CN106965181A - Robot control method and system based on ROS and OROCOS - Google Patents

Robot control method and system based on ROS and OROCOS Download PDF

Info

Publication number
CN106965181A
CN106965181A CN201710257077.0A CN201710257077A CN106965181A CN 106965181 A CN106965181 A CN 106965181A CN 201710257077 A CN201710257077 A CN 201710257077A CN 106965181 A CN106965181 A CN 106965181A
Authority
CN
China
Prior art keywords
control instruction
robot
orocos
interface
ros
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
CN201710257077.0A
Other languages
Chinese (zh)
Other versions
CN106965181B (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201710257077.0A priority Critical patent/CN106965181B/en
Publication of CN106965181A publication Critical patent/CN106965181A/en
Priority to PCT/CN2017/103435 priority patent/WO2018192177A1/en
Application granted granted Critical
Publication of CN106965181B publication Critical patent/CN106965181B/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
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators

Abstract

The present invention relates to a kind of robot control method based on ROS and OROCOS and system, methods described includes:The control instruction that control end is inputted is received according to the communication protocol interface being pre-configured with;Function is triggered according to the control instruction of the control instruction Selection and call robot motion planning;Call the receptance function of corresponding robot motion planning in the algorithm processor to calculate control instruction Data Concurrent by first interface by control instruction triggering function and deliver to robot;Wherein, each control instruction triggering function pair answers a kind of receptance function correspondence of robot motion planning in algorithm processor;The first interface is based on the real-time input/output interface that OROCOS is created on ROS, for being communicatively coupled with algorithm processor.Technical scheme, may be constructed a complete robot controller software, reduce robot control system development cost, improve control effect.

Description

Robot control method and system based on ROS and OROCOS
Technical field
The present invention relates to technical field of robot control, more particularly to a kind of robot control based on ROS and OROCOS Method and system processed.
Background technology
Robot Operating System (ROS) are the robot operating systems increased income, and can be robot development person One programming framework standardizing, increasing income is provided.But ROS does not support real-time thread to operate at present.Open Robot Control Software (OROCOS) are also a kind of robot control software's programming framework increased income, and its feature is to support real When threading operation, but its opening, versatility do not have ROS good.
Therefore, at present in some application schemes, OROCOS is used on ROS, but prior art is in the frame built On structure, it is impossible to constitute a complete robot controller software, it is impossible to make full use of ROS and OROCOS characteristic, system is opened Send out cost high, control effect is poor.
The content of the invention
Based on this, it is necessary to which for above-mentioned technical problem, there is provided a kind of robot control method based on ROS and OROCOS And system, system development costs are reduced, control effect is improved.
A kind of robot control method based on ROS and OROCOS, including:
The control instruction that control end is inputted is received according to the communication protocol interface being pre-configured with;
Function is triggered according to the control instruction of the control instruction Selection and call robot motion planning;
Function is triggered by the control instruction corresponding machine in the algorithm processor is called by first interface The receptance function of people's motion planning calculates control instruction Data Concurrent and delivers to robot;
Wherein, each control instruction triggering function pair answers a kind of response of robot motion planning in algorithm processor Function pair should;The first interface is, based on the real-time input/output interface that OROCOS is created on ROS, to be used for and algorithm process Program is communicatively coupled.
A kind of robot control system based on ROS and OROCOS, including:
Receiving unit, the control instruction for receiving control end input according to the communication protocol interface being pre-configured with;
Selecting unit, for triggering letter according to the control instruction of the control instruction Selection and call robot motion planning Number;
Transmitting element, the algorithm processor is called for triggering function by the control instruction by first interface In the receptance function of corresponding robot motion planning calculate control instruction Data Concurrent and deliver to robot;
Wherein, each control instruction triggering function pair answers a kind of response of robot motion planning in algorithm processor Function pair should;The first interface is, based on the real-time input/output interface that OROCOS is created on ROS, to be used for and algorithm process Program is communicatively coupled.
Above-mentioned robot control method and system based on ROS and OROCOS, are connect using OROCOS real-time input/output Mouth is communicated with algorithm processor, is received control instruction by the communication protocol interface being pre-configured with, is passed through control instruction Function is triggered, the receptance function of the robot motion planning of algorithm processor is called, control instruction Data Concurrent is calculated and delivers to Robot, realizes reception distribution, parsing and the transmission of control instruction, may be constructed a complete robot controller software, Robot control system development cost is reduced, control effect is improved.
Brief description of the drawings
Fig. 1 is the robot control method flow chart based on ROS and OROCOS of the embodiment of the present invention;
Fig. 2 is a kind of hardware structure model of robot control system;
Fig. 3 is the architecture diagram that the robot control method based on ROS and OROCOS is built;
Fig. 4 is the state change schematic diagram of controller state machine;
Fig. 5 is the state change schematic diagram of equipment state machine;
Fig. 6 is the robot control system architecture schematic diagram based on ROS and OROCOS of the embodiment of the present invention.
Embodiment
The robot control method based on ROS and OROCOS of the present invention and the implementation of system are illustrated below in conjunction with the accompanying drawings Example.
With reference to shown in Fig. 1, Fig. 1 is the robot control method flow chart based on ROS and OROCOS of the embodiment of the present invention; Mainly comprise the following steps:
S101, the control instruction that control end is inputted is received according to the communication protocol interface being pre-configured with;It can be opened by ICE The communication protocol of hair sets up the communication connection with control end, by the dynamic asynchronous remote procedure call for calling the communication protocol The control instruction of method input.
S102, function is triggered according to the control instruction of the control instruction Selection and call robot motion planning;Wherein, often Individual control instruction triggering function pair answers a kind of receptance function correspondence of robot motion planning in algorithm processor.
S103, triggers function by the control instruction and is called by first interface in the algorithm processor accordingly The receptance function of robot motion planning calculates control instruction Data Concurrent and delivers to robot;The first interface is to be based on ROS Upper establishment OROCOS real-time input/output interface, for being communicatively coupled with algorithm processor.
The technical scheme of above-described embodiment, is carried out using OROCOS real-time input/output interface and algorithm processor Communication, receives control instruction by the communication protocol interface being pre-configured with, triggers function by control instruction, call algorithm process The receptance function of the robot motion planning of program, calculates control instruction Data Concurrent and delivers to robot, realize control instruction Receive distribution, parsing and transmit, may be constructed a complete robot controller software, reduction robot control system exploitation Cost, improves control effect.
In one embodiment, for the communication protocol interface in step S101, ICE (The Internet can be used Communications Engine, Internet communication engine) communication protocol, can be with when receiving the control instruction of control end input Communication connection with control end is set up by the ICE communication protocols developed, by calling the dynamic asynchronous of the communication protocol remote The control instruction of journey procedure calling (PRC) method input.
In one embodiment, the algorithm processor calculates according to the receptance function and obtains control instruction data, And sent by second interface to communication management program, the communication management program sends control instruction data to robot; The second interface is based on the real-time input/output interface that OROCOS is created on ROS, for algorithm processor and communication tube Reason program is communicatively coupled.
In one embodiment, before the control instruction of control end input is received, control instruction that control end is initiated with The receptance function of corresponding robot motion planning is bound in the algorithm processor;Receiving the control of control end input After system instruction, first parameter of the control instruction is obtained, the motion planning type for judging currently to call according to the parameter, The control instruction for calling corresponding motion planning according to the motion planning type selecting triggers function, calls algorithm processor In corresponding receptance function calculate control instruction parameter.
In one embodiment, the motion planning includes:Point-to-point is moved, and linear motion, circular motion is shown manually Religion, returns to origin, pause, recovers or jerk.
In one embodiment, with acquisition algorithm processing routine and the relevant information of communication management program and it can be located Reason.
(1) can be by call back function mode from the incoming feedback information of the first interface receiving algorithm processing routine; Wherein, the diagnostic data that the feedback information includes incident report information, robot motor runs;Time including generation error Stab, the information such as event level, and by event information, the human-computer interaction interface that these information can be sent to control end is shown;
(2) the incoming feedback information of the 3rd interface communication management program can be passed through;Wherein, the described 3rd connect Mouth is based on the real-time input/output interface that OROCOS is created on ROS, for being communicatively coupled with communication management program;
The diagnostic data that the feedback information includes incident report information, robot motor runs;Such as, position, speed, Whether acceleration transfinites etc..
In one embodiment, function is triggered in the control instruction of step S102 Selection and call robot motion planning Before, it can also first be carried out initialization process:Detection history runs recorded Log Report, if Log Report is normal, leads to Event reporting interface is crossed to receive relevant information and handled;If Log Report is abnormal, exit.
In one embodiment, can also be by controller state machine come to algorithm processor and communication management program Running status is controlled, specific as follows:
According to the type of the control instruction received, to controller state machine write state event;According to the state thing Part controls the running status of the algorithm processor and communication management program;Wherein, controller state machine is provided with initialization, referred to Order is waited, instruction performs, interrupts and enable corresponding state, and the enabled state is son corresponding with every kind of motion planning respectively The intersection of state.
For first interface, second interface and the 3rd interface, refer to be respectively used to carry out communication link with algorithm processor The interface connect, the interface being communicatively coupled for algorithm processor and communication management program, and be used for and telecommunication management The interface that program is communicated;According to input/output interface model split, first interface is included to the defeated of algorithm processor Enter/output interface, second interface includes the input/output interface to communication management program.
ROS orocreate-catkin-pkg methods can be used to be created as ROS Package, and in Package Inherit OROCOS RTT::TaskContext classes, utilize OROCOS RTT::Input and RTT::The definition of Output methods is real When input/output interface.
In order to become apparent from the technical scheme of embodiments of the invention, the reality realized using the method for the present invention is described below Example.
In this example, hardware and software environment can be as follows:
With reference to shown in Fig. 2, Fig. 2 is a kind of hardware structure model of robot control system, in taking for robot controller Software architecture is built, (SuSE) Linux OS is run on, the Linux main frames can be the PC of X86-based, or the insertion of ARM chips The development board of formula framework, the control instruction of the human-computer interaction interface at controller management program Access Control end.
Linux main frames can install following software:Xenomai or RTAI real-time kernel patch can be installed;Can be with The softwares such as installation ROS, OROCOS, rFSM.
With reference to shown in Fig. 3, Fig. 3 is the architecture diagram that the robot control method based on ROS and OROCOS is built;In control During system, operation controller management program, algorithm processor and communication management program in operating system;Controller management journey Ordered pair should run the robot control method based on ROS and OROCOS of the present invention.
1st, for controller management program:
(1) controller management program creates ROS Package, note using ROS orocreate-catkin-pkg methods For Ec_control_system, then in Package, by the RTT for inheriting OROCOS::TaskContext classes, are designated as Ec_control_system_component。
In the constructed fuction of Ec_control_system_component classes, following operation is arranged to carry out:
A) OROCOS RTT is utilized::Input and RTT::Output methods, the input to module, output interface is determined Justice.
The interface wherein inputted includes:
1. the incoming diagnostic data of communication management program;
2. the incoming state feedback information of communication management program:Including motor operating state etc.;
3. the state of controller state machine;
The interface of output includes:
1. controller state machine event is triggered, and is exported and is given controller state machine.
B) function call interface is set using OROCOS Operational Caller methods.
First, the call back function for setting event to report:Event report processing request is responded, including generation error Timestamp, the information such as event level, and by event information, be sent to human-computer interaction interface and show.
Second, the call back function for setting alarm to set:According to diagnostic message, judge whether to generate alarm.Such as, position, Whether speed, acceleration transfinites etc..
3rd, the control instruction triggering function of various motion plannings is set, and these functions are by the phase of algorithm processor Receptance function is answered to be called, including:
1. point-to-point is moved;
2. origin is returned to;
3. move along a straight line;
4. circular motion;
5. suspend;
6. recover;
7. jerk;
8. manual teaching.
C) OROCOS Properties methods are called to define the attribute of controller management program, by controller management program Define the attribute of a joint of mechanical arm number.
(2) in Ec_control_system_component StartHook () member function, set execution as follows Operation:
A) whether audit log report is normal, if abnormal directly exit, and relevant information is passed by event reporting interface Pass the processing of controller management program;
B) communication connection with human-computer interaction interface is set up by the ICE communication protocols developed, and calls communication protocol to carry Dynamic asynchronous remote procedure call (RPC) method of confession, the readjustment responded to the control instruction that human-computer interaction interface is initiated Function is bound.The call back function, first according to ICE (The Internet Communications Engine, internet Communication engines) incoming first parameter of remote process asynchronous invoking method that provides, call type is judged, then according to such The control instruction triggering function of type Selection and call corresponding sports planning, including:Recover, pause, manual teaching returns to origin, point To a motion, linear motion, circular motion, jerk.
(3) for Ec_control_system_component CleanUpHook () member function, in order that must be somebody's turn to do Function is when controller management EP (end of program) is run, and realization is called automatically, may be arranged as performing following operation:
A) communication protocol interface for calling ICE to develop, closes the communication connection with human-computer interaction interface.
(4) for controller state machine, with reference to shown in Fig. 4, Fig. 4 is the state change schematic diagram of controller state machine;Can With set Init, Ready, Fault, Active.Recovery, Active.Halt, Active.Hands, Active.ToZero, Active.PTP, Active.Line, Active.Circle, Active.Stop totally ten one states, point Dai Biao not initialize, wait instruction input, recovery, pause, manual teaching, return to origin, point-to-point motion, linear motion, circle Arc motion, jerk state.Wherein, Active.Recovery, Active.Halt, Active.Hands, Active.ToZero, This eight states of Active.PTP, Active.Line, Active.Circle, Active.Stop constitute an Active state Set, Active node transition rule is effective to eight sub- states.For example, to any one in eight states, write-in " e_ready " event, is transferred to Ready states from current state by the state of controller state machine and (waits instruction input shape State).
Furthermore it is also possible to using Lua language, write the startup file of controller management program, the startup file is set to Perform following action:
A) by OROCOS import methods, load-on module is run;
B) refreshing frequency of definition module, the priority level of thread;
C) assignment is carried out to the attribute of module;
D) by OROCOS connect methods, by the input of controller management program, output interface and algorithm process journey The interface of sequence and communication management program sets up connection.
E) by OROCOS start methods, operation controller management program, controller management program will be called first StartHook () function, then by default refreshing frequency, periodically invoked UpdateHook () function in real time.
2nd, for algorithm processor:
Algorithm processor creates ROS Package using ROS orocreate-catkin-pkg methods, is designated as Ec_ Control_loop, then in Package, by the RTT for inheriting OROCOS::TaskContext classes, are designated as Ec_ control_loop_component。
(1) in the constructed fuction of Ec_control_loop_component classes, it is arranged to carry out following operation:
A) algorithm processor utilizes OROCOS RTT::Input and RTT::Output methods, to input, output interface It is defined.
The interface wherein inputted includes:
1. incoming motor operation data of communication management program;
2. the incoming diagnostic data of communication management program;
3. the state of equipment state machine;
4. the state of controller state machine;
The interface of output includes:
1. motor control instruction data, are exported to device communication module;
2. motor operation data, export and give control algolithm processing routine;
3. equipment state machine event is triggered, and is exported and is given equipment state machine;
4. controller state machine event is triggered, and is exported and is given controller state machine.
B) function call interface is set using OROCOS Operational Caller methods, what setting event was reported connects Mouthful:The interface responds the control instruction that the event report of trigger controller management program handles the various motion plannings of function setup Function, including:
1. point-to-point is moved;
2. origin is returned to;
3. move along a straight line;
4. circular motion;
5. suspend;
6. recover;
7. jerk;
8. manual teaching.
C) OROCOS Properties methods are called to define the attribute of algorithm processor, algorithm processor defines one The attribute of individual joint of mechanical arm number.
(2) in Ec_control_loop_component StartHook () member function, it is arranged to carry out as follows Operation:
A) whether audit log report is normal, if abnormal directly exit, and relevant information is passed by event reporting interface Pass the processing of controller management program;
B) check whether motor operation data channel there are data, if no data is directly exited, and relevant information is passed through into thing Part reporting interface passes to the processing of controller management program.
(3) for UpdateHook () member function of Ec_control_loop_component classes, the function is set to exist When algorithm processor is run, the frequency real time execution (being such as set to 100Hz) set according to user could be arranged to execution as follows Operation:
A) Read Controller state machine state;
B) according to the different conditions of controller state machine, different operating is performed:
Ith, if point-to-point is moved, linear motion, circular motion, manual teaching, jerk returns to origin state.Now, Perform following operation:
If the control instruction number of instruction buffer is less than 20, all instructions are sent jointly into telecommunication management journey Sequence, and be wait instruction input state by the state change of controller state machine;
If the control instruction number of instruction buffer is more than 20,20 of instruction fetch queue end, it is sent to logical Believe management program;
IIth, if halted state, then do nothing.
(4) for Ec_control_loop_component classes, point-to-point motion is defined, is moved along a straight line, circular motion, Manual teaching, jerk returns to origin, pause, the function call interface such as recovery, realizes as follows:
A) point-to-point is moved, linear motion, circular motion, manual teaching, returns to the function of origin, and inside is realized as follows:
Check controller state machine whether in wait instruction input state.If not then exiting, and by relevant information Controller management program is passed to by event reporting interface to handle;
Read the current status information of motor;
According to the current state of motor, call point-to-point to move respectively, move along a straight line, circular motion, manual teaching is returned to The motion planning of origin, and the motor control instruction of generation is saved in instruction buffer;
Controller state machine is set to corresponding state.Such as point-to-point motion call back function, then by controller state machine It is set to point-to-point motion state.
B) function is suspended, inside is realized as follows:
Whether be point-to-point motion, linear motion, circular motion, manual teaching returns to origin if checking controller state machine Etc. state.If not then exiting, and relevant information is passed at controller management program by event reporting interface Reason;
The current state of current controller state machine is recorded, and the state of controller state machine is changed into halted state.
C) reconstruction, inside is realized as follows:
Check whether controller state machine is halted state.If not then exiting, and relevant information is passed through into event report Accuse interface and pass to the processing of controller management program;
The state of controller state machine is changed into the state before pause.
D) jerk function, inside is realized as follows:
Whether be point-to-point motion, linear motion, circular motion, manual teaching returns to original if the Ith, checking controller state machine The states such as point.If not then exiting, and relevant information is passed into controller management program by event reporting interface handled;
IIth, the current status information of motor is read;
IIIth, motor control instruction buffering area is reset;
IVth, speed planning motion planning is called, motor is allowed with the shortest time, speed is reduced to 0, and by the motor control of generation Instruction is saved in instruction buffer.
(5) Lua language is used, the startup file of algorithm processor is write, following action is arranged to carry out:
A) OROCOS import methods, loading algorithm processing routine are passed through;
D) refreshing frequency of algorithm processor, the priority level of thread are defined;
C) assignment is carried out to the attribute of algorithm processor;
D) by OROCOS connect methods, by the input of algorithm processor, output interface and controller management journey The interface of sequence and communication management program sets up connection.
E) by OROCOS start methods, algorithm processor is run, algorithm processor first calls StartHook () function, then by the refreshing frequency of setting, periodically invoked UpdateHook () function in real time.
3rd, for communication management program:
Communication management program can develop board communications, Ke Yi by the ttyACM0 in linux main frames minicom and Arm A CANOpen master station protocol is run on the Arm development boards, the master station protocol can set an instruction buffer area, at most may be used To store 25 instructions.
Communication management program can utilize OROCOS RTT::Input and RTT::At Output methods and robot algorithm Reason program and controller management program are communicated.
Equipment state machine is set up using rFSM softwares, the service logic to communication management program is controlled.
Communication management program utilizes OROCOS RTT::Input and RTT::Output method and apparatus state machine is connected, The state of equipment state machine, and reading state can be changed.
(1) communication module is created as ROS Package, Ran Hou using ROS orocreate-catkin-pkg methods In Package, by the RTT for inheriting OROCOS::TaskContext classes, create OROCOS Real time capable module, are designated as Ec_ component。
In the constructed fuction of Ec_component classes, following operation is arranged to carry out:
A) communication management program utilizes OROCOS RTT::Input and RTT::Output methods, to input, output interface It is defined.
The interface wherein inputted includes:
1. incoming control instruction data of algorithm processor;
2. the state of equipment state machine;
The interface of output includes:
1. diagnostic data, is exported to algorithm processor and controller management program;
2. motor operation data, are exported to algorithm processor;
3. state machine events are triggered, and are exported and are given equipment state machine.
B) using OROCOS Operational Caller method defined function calling interfaces, communication management program definition The interface of event report, passes through the event report processing function of the interface trigger controller management program.
C) OROCOS Properties methods are called to define the attribute of communication management program, communication management program defines one The attribute of individual joint of mechanical arm number.
(2) in Ec_component StartHook () member function, it is arranged to carry out following operation:
A) whether audit log report is normal, if abnormal directly exit, and relevant information is passed by event reporting interface Controller management program is passed to be handled;
B) motor driving initialization:
Ith, set up and communicated with motor driver by ttyACM0;
IIth, motor command buffering queue is emptied;
IIIth, motor is enabled, if enabled successfully, is carried out next step, is otherwise exited;
IVth, the position of motor, the mechanical arm current state of calculating robot, including joint angles, mechanical arm tail end are read Pose;
C) mechanical arm state initialization:
According to motor position, judge whether mechanical arm needs to perform back to zero motion.If any joint angles of mechanical arm with Zero degree differs by more than 0.01 degree, then performs back to zero motion, call point-to-point motion planning, and back to zero motion is planned.
D) state of equipment state machine is changed:
If the mechanical arm of robot needs to perform back to zero motion, control device state machine keeps Init states constant; Otherwise, " e_nominal " event is sent to equipment state machine, is Active.Nominal by the State Transferring of equipment state machine.
(3) for Ec_component UpdateHook () member function, the function is set to be transported in communication management program During row, the frequency real time execution (being such as set to 1KHz) set with user is arranged to carry out following operation:
A) equipment state machine state is read;
B) according to the different conditions of equipment state machine, different operating is performed:
Ith, if Init states, the back to zero motion of mechanical arm is performed.Now, following operation is performed:
The clock of reading system, according to back to zero Motion trajectory result, calculates the movement instruction of the moment motor, and will The wall scroll movement instruction is sent to CANOpen main websites.
If motion back to zero success, sends " e_nominal " event to equipment state machine, equipment state machine is converted to Active.Nominal, and the event is reported give controller management program.
IIth, if Active.Nominal states.Now, following operation is performed:
From the input channel of control instruction data, control instruction is read, and store into motor command buffering queue.
The existing number of instructions of CANOpen main websites instruction buffer is read, if less than 10, is then disposably referred to from motor 15 movement instructions of taking-up in buffering queue are made to be sent to CANOpen main websites.If the number of instructions of motor command buffering queue It is less than 15, then disposable to be all sent to CANOpen main websites.
IIIth, if Active.Recovery states.Now, communication management program is in recovery state.
Now, according to diagnostic message, system mode is recovered, if being successfully recovered, " e_ is sent to equipment state machine Nominal " events, Active.Nominal is converted to by equipment state machine.And the event is reported give controller management program.
If recovery is unsuccessful, " e_fault " event is sent to state machine, state machine is converted to Fault states, by the event Report and give controller management program, and directly exit UpdateHook ().
IVth, if Active.Halt states.Now, module placed in a suspend state, performs following operation:Check control Whether there is new instruction in the input channel of director data, if there is new command, read control instruction, and store to motor command In buffering queue.
Vth, if Active.Hands states.Now, module is in manual mode, performs following operation:
The clock of reading system, according to Motion trajectory result, calculates the movement instruction of the moment motor, and by the list Bar movement instruction is sent to CANOpen main websites.
VIth, if Fault states, then UpdateHook () is directly exited.
C) motor status, calculating machine shoulder joint and end movement status information are read, and by output data passage, Pass to algorithm processor and controller management program;
D) the whether wrong report information of control main website is checked, if error message, then diagnostic message calculation is passed into Method processing routine and controller management program." e_recovery " event is sent to equipment state machine, equipment state machine is changed For Active.Recovery states and the event is reported give controller management program.
(4) for Ec_component CleanUpHook () member function, the function is when module terminates operation, certainly It is dynamic to call, set and perform following operation:
A) motor driving is closed to enable;
B) motor drive connection is closed.
(5) with reference to shown in Fig. 5, Fig. 5 is the state change schematic diagram of equipment state machine.Shared Init (initialization), Fault (interruption), Active.Recovery (recovery), Active.Hands (manual teaching), Active.Halt (pause), Six states of Active.Nominal (operating).Active.Recovery、Active.Hands、Active.Halt、 Tetra- states of Active.Nominal constitute the state set of an Active (enable), and Active node transition rule is right Four sub- states are effective.
(6) Lua language is used, the startup file of the module is write, the startup file, which is set, performs following action:
A) by OROCOS import methods, communication management program is loaded;
B) refreshing frequency of communication management program, the priority level of thread are defined;
C) assignment is carried out to the attribute of communication management program;
D) by OROCOS connect methods, by the input of communication management program, output interface and controller management journey The interface of sequence and algorithm mould etc. sets up connection.
E) by OROCOS start methods, communication management program is run, communication management program first calls StartHook () function, then good refreshing frequency by definition, in real time periodically invoked UpdateHook () function.
For controller noted above management program, algorithm processor and communication management program, it is set to after operation, if User needs midway to stop the module, while the ctrl keys of keypad and D keys.
To sum up embodiment, based on ROS and OROCOS, utilizes OROCOS real time characteristic, it is ensured that software program it is real-time Performance;ROS opening is made full use of, the controller management program developed based on ROS, OROCOS, algorithm processor and logical Believe that management program carries out real-time Communication for Power, collectively form a complete robot controller software;It further established controller State machine and equipment state machine, are effectively managed so as to realize to controller management program, the service logic of communication management program Reason.
Pass through OROCOS RTT::Input,RTT::Output methods set up controller management program, algorithm processor Data input, output channel with communication management program, pass through OROCOS Operational Caller method defined functions Calling interface, controller management program, algorithm processor and telecommunication management are defined by OROCOS Properties methods The attribute of program.Thus it is guaranteed that independence between controller management program, algorithm processor and communication management program with Decoupling.
With reference to Fig. 6, Fig. 6 is the robot control system architecture schematic diagram based on ROS and OROCOS of the embodiment of the present invention, Including:
Receiving unit 101, the control instruction for receiving control end input according to the communication protocol interface being pre-configured with;
Selecting unit 102, for being triggered according to the control instruction of the control instruction Selection and call robot motion planning Function;
Transmitting element 103, the algorithm process is called for triggering function by the control instruction by first interface The receptance function of corresponding robot motion planning calculates control instruction Data Concurrent and delivers to robot in program;
Wherein, each control instruction triggering function pair answers a kind of response of robot motion planning in algorithm processor Function pair should;The first interface is, based on the real-time input/output interface that OROCOS is created on ROS, to be used for and algorithm process Program is communicatively coupled.
The robot control system and the machine based on ROS and OROCOS of the present invention based on ROS and OROCOS of the present invention Device people control method is corresponded, the technology illustrated in the embodiment of the above-mentioned robot control method based on ROS and OROCOS Feature and its advantage suitable for the embodiment based on ROS and OROCOS robot control system, hereby give notice that.
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality Apply all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, the scope of this specification record is all considered to be.
Embodiment described above only expresses the several embodiments of the present invention, and it describes more specific and detailed, but simultaneously Can not therefore it be construed as limiting the scope of the patent.It should be pointed out that coming for one of ordinary skill in the art Say, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (10)

1. a kind of robot control method based on ROS and OROCOS, it is characterised in that including:
The control instruction that control end is inputted is received according to the communication protocol interface being pre-configured with;
Function is triggered according to the control instruction of the control instruction Selection and call robot motion planning;
Corresponding robot in the algorithm processor is called to transport by first interface by control instruction triggering function The receptance function of dynamic planning calculates control instruction Data Concurrent and delivers to robot;
Wherein, each control instruction triggering function pair answers a kind of receptance function of robot motion planning in algorithm processor Correspondence;The first interface is, based on the real-time input/output interface that OROCOS is created on ROS, to be used for and algorithm processor It is communicatively coupled.
2. the robot control method according to claim 1 based on ROS and OROCOS, it is characterised in that according to advance The step of communication protocol interface of configuration receives the control instruction of control end input includes:
Communication connection with control end is set up by the ICE communication protocols developed, by calling the dynamic of the communication protocol different Walk the control instruction of remote procedure calling (PRC) method input.
3. the robot control method according to claim 1 based on ROS and OROCOS, it is characterised in that the algorithm Processing routine calculates according to the receptance function and obtains control instruction data, and is sent by second interface to telecommunication management journey Sequence, the communication management program sends control instruction data to robot;
The second interface is based on the real-time input/output interface that OROCOS is created on ROS, for algorithm processor with leading to Letter management program is communicatively coupled.
4. the robot control method according to claim 3 based on ROS and OROCOS, it is characterised in that receiving control Before the control instruction of end input processed, the control instruction that control end is initiated robot fortune corresponding with the algorithm processor The receptance function of dynamic planning is bound;
After the control instruction of control end input is received, first parameter of the control instruction is obtained, is sentenced according to the parameter The disconnected motion planning type currently called, the control instruction of corresponding motion planning is called according to the motion planning type selecting Function is triggered, calls corresponding receptance function in algorithm processor to calculate control instruction parameter.
5. the robot control method according to claim 4 based on ROS and OROCOS, it is characterised in that the motion Planning includes:Point-to-point is moved, linear motion, circular motion, manual teaching, is returned to origin, pause, is recovered or jerk.
6. the robot control method based on ROS and OROCOS according to any one of claim 1 to 5, it is characterised in that Also include:
By call back function mode from the incoming feedback information of the first interface receiving algorithm processing routine, pass through the described 3rd The incoming feedback information of interface communication management program, and the feedback information is handled;
Wherein, the diagnostic data that the feedback information includes incident report information, robot motor runs;3rd interface is Based on the real-time input/output interface that OROCOS is created on ROS, for being communicatively coupled with communication management program.
7. the robot control method according to claim 6 based on ROS and OROCOS, it is characterised in that according to institute Before the control instruction triggering function for stating control instruction Selection and call robot motion planning, in addition to:
Detection history runs recorded Log Report, if Log Report is normal, relevant information is received by event reporting interface And handled;
If Log Report is abnormal, exit.
8. the robot control method according to claim 6 based on ROS and OROCOS, it is characterised in that also include:
According to the type of the control instruction received, to controller state machine write state event;According to the state event control Make the running status of the algorithm processor and communication management program;
Wherein, controller state machine is waited provided with initialization, instruction, instruction is performed, is interrupted and is enabled corresponding state, described to make Energy state is the intersection of sub- state corresponding with every kind of motion planning respectively.
9. the robot control method according to claim 1 based on ROS and OROCOS, it is characterised in that use ROS's Orocreate-catkin-pkg methods are created as ROS Package, and inherit in Package OROCOS RTT:: TaskContext classes, utilize OROCOS RTT::Input and RTT::Output methods define real-time input/output interface.
10. a kind of robot control system based on ROS and OROCOS, it is characterised in that including:
Receiving unit, the control instruction for receiving control end input according to the communication protocol interface being pre-configured with;
Selecting unit, for triggering function according to the control instruction of the control instruction Selection and call robot motion planning;
Transmitting element, phase in the algorithm processor is called for triggering function by the control instruction by first interface The receptance function for the robot motion planning answered calculates control instruction Data Concurrent and delivers to robot;
Wherein, each control instruction triggering function pair answers a kind of receptance function of robot motion planning in algorithm processor Correspondence;The first interface is, based on the real-time input/output interface that OROCOS is created on ROS, to be used for and algorithm processor It is communicatively coupled.
CN201710257077.0A 2017-04-19 2017-04-19 Robot control method and system based on ROS and OROCOS Active CN106965181B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710257077.0A CN106965181B (en) 2017-04-19 2017-04-19 Robot control method and system based on ROS and OROCOS
PCT/CN2017/103435 WO2018192177A1 (en) 2017-04-19 2017-09-26 Ros and orocos-based robot control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710257077.0A CN106965181B (en) 2017-04-19 2017-04-19 Robot control method and system based on ROS and OROCOS

Publications (2)

Publication Number Publication Date
CN106965181A true CN106965181A (en) 2017-07-21
CN106965181B CN106965181B (en) 2019-12-17

Family

ID=59333824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710257077.0A Active CN106965181B (en) 2017-04-19 2017-04-19 Robot control method and system based on ROS and OROCOS

Country Status (2)

Country Link
CN (1) CN106965181B (en)
WO (1) WO2018192177A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018192177A1 (en) * 2017-04-19 2018-10-25 广州视源电子科技股份有限公司 Ros and orocos-based robot control method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110054684A1 (en) * 2009-09-01 2011-03-03 Electronics And Telecommunications Research Institute Method and system for transferring/acquiring operation right of moving robot in multi-operator multi-robot environment
CN104699122A (en) * 2015-02-12 2015-06-10 哈尔滨工业大学 Robot motion control system
CN104708517A (en) * 2015-03-24 2015-06-17 北京理工大学 Industrial robot automatic grinding and polishing system based on ROS
CN105278940A (en) * 2014-07-08 2016-01-27 北京航空航天大学 Robotic hybrid system application frame based on multi-core processor architecture
CN106020208A (en) * 2016-07-27 2016-10-12 湖南晖龙股份有限公司 Robot remote control method based on ROS operating system and remote control system thereof
CN106292543A (en) * 2015-05-14 2017-01-04 宁波舜宇光电信息有限公司 Multi-axis motion controller based on FPGA and application thereof

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100607141B1 (en) * 2004-05-12 2006-08-01 한국생산기술연구원 Robot Control System in Open Distributed Process Architecture
CN101537613A (en) * 2009-01-21 2009-09-23 上海广茂达伙伴机器人有限公司 Open-architecture mobile robot system
CN104786221B (en) * 2015-04-13 2016-12-07 浙江工业大学 A kind of open method for controlling robot based on Ethernet
CN106965181B (en) * 2017-04-19 2019-12-17 广州视源电子科技股份有限公司 Robot control method and system based on ROS and OROCOS
CN106959694B (en) * 2017-04-19 2020-08-04 广州视源电子科技股份有限公司 Robot linear motion control method and system
CN106950924B (en) * 2017-04-19 2019-05-07 广州视源电子科技股份有限公司 Robot circular motion control method and system
CN106914900B (en) * 2017-04-19 2019-05-07 广州视源电子科技股份有限公司 Robot control system based on ROS and OROCOS

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110054684A1 (en) * 2009-09-01 2011-03-03 Electronics And Telecommunications Research Institute Method and system for transferring/acquiring operation right of moving robot in multi-operator multi-robot environment
CN105278940A (en) * 2014-07-08 2016-01-27 北京航空航天大学 Robotic hybrid system application frame based on multi-core processor architecture
CN104699122A (en) * 2015-02-12 2015-06-10 哈尔滨工业大学 Robot motion control system
CN104708517A (en) * 2015-03-24 2015-06-17 北京理工大学 Industrial robot automatic grinding and polishing system based on ROS
CN106292543A (en) * 2015-05-14 2017-01-04 宁波舜宇光电信息有限公司 Multi-axis motion controller based on FPGA and application thereof
CN106020208A (en) * 2016-07-27 2016-10-12 湖南晖龙股份有限公司 Robot remote control method based on ROS operating system and remote control system thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018192177A1 (en) * 2017-04-19 2018-10-25 广州视源电子科技股份有限公司 Ros and orocos-based robot control method and system

Also Published As

Publication number Publication date
CN106965181B (en) 2019-12-17
WO2018192177A1 (en) 2018-10-25

Similar Documents

Publication Publication Date Title
CN106914900B (en) Robot control system based on ROS and OROCOS
CN106926243B (en) Robot teaching motion control method and system
CN106985140B (en) Robot point-to-point motion control method and system
CN106950924B (en) Robot circular motion control method and system
CN106945044A (en) Robot pause motion control method and system
US7554560B2 (en) System for defining network behaviors within application programs
US8260741B2 (en) System and method for utilizing a modular operating system (OS) resident agent allowing an out-of-band server management
CN106945045A (en) The communication means and system of robot control based on ROS and OROCOS
CN102195845B (en) Method, device and equipment for realizing active-standby switching of main control board
CN107030695B (en) Robot returns to origin motion control method and system
CN106959694A (en) robot linear motion control method and system
CN108427616A (en) background program monitoring method and monitoring device
US20130315362A1 (en) Nuclear digital instrumentation and control system
CN106796642B (en) Device detection method and system, electronic device, cloud robot system and computer program product
CN108255585A (en) SDK exception controls and application program operation method, device and its equipment
CN107526681B (en) Robot test system and test method
CN106956265A (en) The execution method and system of robot motion planning based on ROS and OROCOS
US7805734B2 (en) Platform management of high-availability computer systems
CN106965181A (en) Robot control method and system based on ROS and OROCOS
CN109697132A (en) A kind of instantaneous communication system and method for terminal device
CN103294541A (en) Star-structured multi-process communication method and device
CN114095343A (en) Disaster recovery method, device, equipment and storage medium based on double-active system
US20200204661A1 (en) Network application program product and method for processing application layer protocol
CN106598803A (en) Method for remotely monitoring operation of host system
CA3061451A1 (en) Task based service management platform

Legal Events

Date Code Title Description
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