CN106956265A - The execution method and system of robot motion planning based on ROS and OROCOS - Google Patents

The execution method and system of robot motion planning based on ROS and OROCOS Download PDF

Info

Publication number
CN106956265A
CN106956265A CN201710257336.XA CN201710257336A CN106956265A CN 106956265 A CN106956265 A CN 106956265A CN 201710257336 A CN201710257336 A CN 201710257336A CN 106956265 A CN106956265 A CN 106956265A
Authority
CN
China
Prior art keywords
management program
interface
control instruction
controller
orocos
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
CN201710257336.XA
Other languages
Chinese (zh)
Other versions
CN106956265B (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 CN201710257336.XA priority Critical patent/CN106956265B/en
Publication of CN106956265A publication Critical patent/CN106956265A/en
Application granted granted Critical
Publication of CN106956265B publication Critical patent/CN106956265B/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/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1664Programme controls characterised by programming, planning systems for manipulators characterised by motion, path, trajectory planning
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/40Robotics, robotics mapping to robotics vision
    • G05B2219/40519Motion, trajectory planning

Abstract

The present invention relates to a kind of execution method and system of the robot motion planning based on ROS and OROCOS, methods described includes:The control instruction for receiving controller management program by first interface triggers the call instruction of function;The call instruction is responded, corresponding receptance function is selected from the robot motion planning prestored;Control instruction data are calculated according to the receptance function of selection, and are maintained at instruction buffer area;The control instruction data in instruction buffer area are sent to the communication management program by second interface, and robot is forwarded to by the communication management program.Technical scheme, may be constructed a complete robot controller software, reduce robot control system development cost, improve control effect.

Description

The execution method and system of robot motion planning based on ROS and OROCOS
Technical field
The present invention relates to technical field of robot control, more particularly to a kind of robot fortune based on ROS and OROCOS The execution method and system of dynamic planning.
Background technology
ROS (Robot Operating System) is the robot operating system increased income, and can be robot development person One programming framework standardizing, increasing income is provided.But ROS does not support that real-time thread is operated at present.OROCOS(Open Robot Control Software) it is also a kind of robot control software's programming framework increased income, 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 High cost is sent out, 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 motion planning based on ROS and OROCOS Execution method and system, reduce system development costs, improve control effect.
A kind of execution method of the robot motion planning based on ROS and OROCOS, including:
The control instruction for receiving controller management program by first interface triggers the call instruction of function;Wherein, it is described First interface is based on the real-time input/output interface that OROCOS is created on ROS, for being communicated with controller management program Connection;
The call instruction is responded, corresponding receptance function is selected from the robot motion planning prestored;Wherein, it is every kind of The control instruction triggering function of the receptance function correspondence controller management program of robot motion planning;
Control instruction data are calculated according to the receptance function of selection, and are maintained at instruction buffer area;
The control instruction data in instruction buffer area are sent to the communication management program by second interface, and passed through The communication management program is forwarded to robot;Wherein, the second interface be based on ROS create OROCOS it is real-time defeated Enter/output interface, for being communicatively coupled with communication management program.
A kind of execution system of the robot motion planning based on ROS and OROCOS, including:
Receiving unit, finger is called for the control instruction triggering function by first interface reception controller management program Order;Wherein, the first interface is, based on the real-time input/output interface that OROCOS is created on ROS, to be used for and controller management Program is communicatively coupled;
Select unit, for responding the call instruction, selects corresponding response from the robot motion planning prestored Function;Wherein, the control instruction triggering letter of the receptance function correspondence controller management program of every kind of robot motion planning Number;
Computing unit, for calculating control instruction data according to the receptance function of selection, and is maintained at instruction buffer area;
Transmitting element, for being sent the control instruction data in instruction buffer area to the communication tube by second interface Reason program, and robot is forwarded to by the communication management program;Wherein, the second interface is based on establishment on ROS OROCOS real-time input/output interface, for being communicatively coupled with communication management program.
The execution method and system of the above-mentioned robot motion planning based on ROS and OROCOS, utilizes the real-time of OROCOS Input/output interface is communicated with controller management program and communication management program, is received and controlled by controller management program Instruction, function is triggered by control instruction, calls the receptance function of robot motion planning, is calculated control instruction data and is passed through Communication management program is forwarded to robot, realizes the reception distribution of control instruction, parsing and transmits, may be constructed one it is complete Robot controller software, reduces robot control system development cost, improves control effect.
Brief description of the drawings
Fig. 1 is the execution method flow diagram of the robot motion planning 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 execution structural representation of the robot motion planning based on ROS and OROCOS of the embodiment of the present invention.
Embodiment
The execution method of the robot motion planning based on ROS and OROCOS of the present invention is illustrated below in conjunction with the accompanying drawings and is The embodiment of system.
With reference to shown in Fig. 1, Fig. 1 is the execution of the robot motion planning based on ROS and OROCOS of the embodiment of the present invention Method flow diagram, including:
S101, the control instruction for receiving controller management program by first interface triggers the call instruction of function;Wherein, The first interface is based on the real-time input/output interface that OROCOS is created on ROS, for being carried out with controller management program Communication connection;
S102, responds the call instruction, corresponding receptance function is selected from the robot motion planning prestored;Its In, the control instruction triggering function of the receptance function correspondence controller management program of every kind of robot motion planning;
S103, calculates control instruction data, and be maintained at instruction buffer area according to the receptance function of selection;
S104, is sent the control instruction data in instruction buffer area to the communication management program by second interface, And robot is forwarded to by the communication management program;Wherein, the second interface is based on the reality that OROCOS is created on ROS When input/output interface, for being communicatively coupled with communication management program.
The technical scheme of above-described embodiment, using OROCOS real-time input/output interface and controller management program and Communication management program is communicated, and control instruction is received by controller management program, is triggered function by control instruction, is called machine The receptance function of device people's motion planning, calculates control instruction data and is forwarded to robot by communication management program, realize control Reception distribution, parsing and the transmission of system instruction, may be constructed a complete robot controller software, the control of reduction robot System development costs, improve control effect.
In one embodiment, the execution method of the robot motion planning of the invention based on ROS and OROCOS may be used also To receive the motor operation data and diagnostic data of the incoming robot of communication management program using the second interface;And pass through The motor operation data and diagnostic data are reported to controller management program by the first interface.
By such scheme, controller management program results in the motion state related data of robot.
In one embodiment, calling for function is triggered in the control instruction of step S101 reception controller management program Before instruction, initialization process is carried out, detection history runs recorded Log Report, if Log Report is normal, by relevant information Controller management program is passed to by event reporting interface, otherwise exited;And the passage of detection motor operation data, if logical There are motor operation data in road, the motor operation data are passed into controller management program by event reporting interface, no Then exit;Wherein, the event reporting interface is the interface created based on the first interface.
In the embodiment of the present invention, the robot motion planning can include:Point-to-point is moved, linear motion, circular arc fortune Dynamic, manual teaching returns to origin, pause, recovery, jerk scheduling algorithm.
In one embodiment, for calculating control instruction data according to the receptance function of selection in step S103, and protect Hold the step of instruction buffer area, can include as follows:
(a) frequency (such as 100Hz) set according to user, the status information of real-time Read Controller state machine;Wherein, control Device state machine processed is waited provided with initialization, instruction, instruction is performed, interrupted and state corresponding with every kind of motion planning respectively;
(b) receptance function selected according to the status information, control instruction data are calculated using the receptance function, and Control instruction data are maintained in the instruction queue in instruction buffer area;
(c) quantity of the control instruction data in instruction queue, the order according to queue sends out control instruction data Communication management program is delivered to, and updates the state of controller state machine;
For example, if point-to-point motion, linear motion, circular motion, manual teaching, jerk or the shape for returning to origin State, if all control instruction data are sent jointly to lead to by the control instruction data of instruction buffer less than setting quantity Believe management program, and be wait instruction input state by the state change of controller state machine;If greater than setting quantity, then take Instruction queue end, it is sent to communication management program;If halted state, then do nothing.
As embodiment, when step S103 calculates control instruction data according to the receptance function of selection, if the fortune It is dynamic to be planned to point-to-point motion, linear motion, circular motion or manual teaching;Receive the control instruction triggering function passes Order parameter, control instruction data are calculated according to the receptance function of selection and its corresponding order parameter.
For calculate control instruction, moved with point-to-point, move along a straight line, circular motion, manual teaching, return to origin, temporarily Stop, recover, exemplified by jerk, its implementation can be as follows:
The step of calculating control instruction data according to the receptance function of selection includes:
(1) motion planning is point-to-point motion, linear motion, circular motion, manual teaching or returns to origin;Calculate Method is as follows:
If controller state machine, which is in, waits instruction input state, and relevant information is passed to by event reporting interface Controller management program;
According to motor operation data, call point-to-point to move respectively, move along a straight line, circular motion or is returned to manual teaching The motion planning of origin calculates motor control instruction data, and is saved into instruction buffer;
By controller state machine be set to linear motion, circular motion, manual teaching or return to origin motion planning it is corresponding State.
(2) motion planning is pause and recovers;Computational methods are as follows:
For pause:
Whether detection controller state machine is point-to-point motion, linear motion, circular motion, manual teaching or returns to origin Corresponding state;If so, the current state of recording controller state machine, and the state of controller state machine is set to pause correspondence State, otherwise exit, and relevant information is passed into controller management program by event reporting interface;
For recovering:
Detect whether controller state machine is halted state;If so, the state of controller state machine is changed into before pause The state recorded, is otherwise exited, and relevant information is passed into controller management program by event reporting interface.
(3) motion planning is jerk;Computational methods are as follows:
Whether detection controller state machine is point-to-point motion, linear motion, circular motion, manual teaching or returns to origin Corresponding state;
If it is not, exiting and relevant information being passed into controller management program by event reporting interface;
If so, the current commanded state information of motor is read, by the motor control instruction buffering area of communication management program Reset;
Controller state machine is set to the corresponding state of jerk, and calls speed planning motion algorithm to calculate motor with most short Time speed is reduced to 0 control instruction data, and the control instruction data are saved in into instruction buffer.
For first interface and second interface, refer to be respectively used to controller management program and for telecommunication management journey The interface that sequence is communicated;According to input/output interface model split, first interface is included to the defeated of controller management program 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 install following software:Xenomai or RTAI real-time kernel patch is installed;Then install The softwares such as 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;Algorithm processor The execution method of the robot motion planning based on ROS and OROCOS of the correspondence operation 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 calling communication agreement is carried 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 Make and taken out in buffering queue 15 movement instructions 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 shown in Fig. 6, Fig. 6 is the execution of the robot motion planning based on ROS and OROCOS of the embodiment of the present invention System structure diagram, including:
Receiving unit 101, the tune of function is triggered for receiving the control instruction of controller management program by first interface With instruction;Wherein, the first interface is, based on the real-time input/output interface that OROCOS is created on ROS, to be used for and controller Management program is communicatively coupled;
Select unit 102, for responding the call instruction, selects corresponding ring from the robot motion planning prestored Answer function;Wherein, the control instruction triggering of the receptance function correspondence controller management program of every kind of robot motion planning Function;
Computing unit 103, for calculating control instruction data according to the receptance function of selection, and is maintained at instruction buffer Area;
Transmitting element 104, for being sent the control instruction data in instruction buffer area to described logical by second interface Believe management program, and robot is forwarded to by the communication management program;Wherein, the second interface is based on wound on ROS OROCOS real-time input/output interface is built, for being communicatively coupled with communication management program.
The execution system of the robot motion planning based on ROS and OROCOS of the present invention with the present invention based on ROS and The execution method of OROCOS robot motion planning is corresponded, in above-mentioned robot motion's rule based on ROS and OROCOS The technical characteristic and its advantage that the embodiment for the execution method drawn is illustrated are applied to the robot based on ROS and OROCOS In the embodiment of the execution system of motion planning, 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 execution method of the robot motion planning based on ROS and OROCOS, it is characterised in that including:
The control instruction for receiving controller management program by first interface triggers the call instruction of function;Wherein, described first Interface is based on the real-time input/output interface that OROCOS is created on ROS, for carrying out communication link with controller management program Connect;
The call instruction is responded, corresponding receptance function is selected from the robot motion planning prestored;Wherein, every kind of machine The control instruction triggering function of the receptance function correspondence controller management program of people's motion planning;
Control instruction data are calculated according to the receptance function of selection, and are maintained at instruction buffer area;
The control instruction data in instruction buffer area are sent to the communication management program, and by described by second interface Communication management program is forwarded to robot;Wherein, the second interface is based on the real-time input/defeated that OROCOS is created on ROS Outgoing interface, for being communicatively coupled with communication management program.
2. the execution method of the robot motion planning according to claim 1 based on ROS and OROCOS, its feature exists In also including:
The motor operation data and diagnostic data of the incoming robot of communication management program are received using the second interface;And lead to Cross the first interface and the motor operation data and diagnostic data are reported into controller management program.
3. the execution method of the robot motion planning according to claim 2 based on ROS and OROCOS, its feature exists In, receive controller management program control instruction triggering function call instruction before, also include:
Detection history runs recorded Log Report, if Log Report is normal, relevant information is passed by event reporting interface Pass controller management program;If Log Report is abnormal, exit;
The passage of motor operation data is detected, if passage has motor operation data, the motor operation data are passed through into event Reporting interface passes to controller management program;If Log Report is abnormal, exit;
Wherein, the event reporting interface is the interface created based on the first interface.
4. the execution method of the robot motion planning according to claim 3 based on ROS and OROCOS, its feature exists In calculating control instruction data according to the receptance function of selection, and include the step of be maintained at instruction buffer area:
The frequency set according to user, the status information of real-time Read Controller state machine;Wherein, controller state machine is provided with just Beginningization, instruction are waited, instruction is performed, interrupted and state corresponding with every kind of motion planning respectively;
The receptance function selected according to the status information, control instruction data are calculated using the receptance function, and control to refer to Data are made to be maintained in the instruction queue in instruction buffer area;
The quantity of control instruction data in instruction queue, the order according to queue sends control instruction data to communication Management program, and update the state of controller state machine.
5. the execution method of the robot motion planning according to claim 4 based on ROS and OROCOS, its feature exists In 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 execution method of the robot motion planning according to claim 5 based on ROS and OROCOS, its feature exists In, if the motion planning moves for point-to-point, move along a straight line, circular motion or manual teaching;
The step of calculating control instruction data according to the receptance function of selection, includes:
The order parameter that the control instruction triggers function passes is received, is joined according to the receptance function of selection and its corresponding instruction Number calculates control instruction data.
7. the execution method of the robot motion planning according to claim 5 based on ROS and OROCOS, its feature exists In the motion planning is point-to-point motion, linear motion, circular motion, manual teaching or returns to origin;
The step of calculating control instruction data according to the receptance function of selection includes:
If controller state machine, which is in, waits instruction input state, and relevant information is passed into control by event reporting interface Device management program;
According to motor operation data, call point-to-point to move respectively, move along a straight line, circular motion or returns to origin at manual teaching Motion planning calculate motor control instruction data, and be saved into instruction buffer;
Controller state machine is set to linear motion, circular motion, manual teaching or the corresponding shape of motion planning for returning to origin State.
8. the execution method of the robot motion planning according to claim 5 based on ROS and OROCOS, its feature exists In the motion planning is pause;
The step of calculating control instruction data according to the receptance function of selection includes:
Whether detection controller state machine is point-to-point motion, linear motion, circular motion, manual teaching or returns to origin correspondence State;
If so, the current state of recording controller state machine, and the state of controller state machine is set to suspend corresponding state, Otherwise exit, and relevant information is passed into controller management program by event reporting interface;
The motion planning is recovery;
The step of calculating control instruction data according to the receptance function of selection includes:
Detect whether controller state machine is halted state;If so, being remembered before the state of controller state machine is changed into pause The state of record, is otherwise exited, and relevant information is passed into controller management program by event reporting interface.
9. the execution method of the robot motion planning according to claim 5 based on ROS and OROCOS, its feature exists In the motion planning is jerk;
The step of calculating control instruction data according to the receptance function of selection includes:
Whether detection controller state machine is point-to-point motion, linear motion, circular motion, manual teaching or returns to origin correspondence State;
If it is not, exiting and relevant information being passed into controller management program by event reporting interface;
If so, reading the current commanded state information of motor, the motor control instruction buffering area of communication management program is reset;
Controller state machine is set to the corresponding state of jerk, and calls speed planning motion algorithm to calculate motor with the shortest time Speed is reduced to 0 control instruction data, and the control instruction data are saved in into instruction buffer.
10. a kind of execution system of the robot motion planning based on ROS and OROCOS, it is characterised in that including:
Receiving unit, the call instruction of function is triggered for receiving the control instruction of controller management program by first interface; Wherein, the first interface be based on ROS create OROCOS real-time input/output interface, for controller management journey Sequence is communicatively coupled;
Select unit, for responding the call instruction, selects corresponding receptance function from the robot motion planning prestored; Wherein, the control instruction triggering function of the receptance function correspondence controller management program of every kind of robot motion planning;
Computing unit, for calculating control instruction data according to the receptance function of selection, and is maintained at instruction buffer area;
Transmitting element, for being sent the control instruction data in instruction buffer area to the telecommunication management journey by second interface Sequence, and robot is forwarded to by the communication management program;Wherein, the second interface is to be based on creating OROCOS on ROS Real-time input/output interface, for being communicatively coupled with communication management program.
CN201710257336.XA 2017-04-19 2017-04-19 The execution method and system of robot motion planning based on ROS and OROCOS Active CN106956265B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710257336.XA CN106956265B (en) 2017-04-19 2017-04-19 The execution method and system of robot motion planning based on ROS and OROCOS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710257336.XA CN106956265B (en) 2017-04-19 2017-04-19 The execution method and system of robot motion planning based on ROS and OROCOS

Publications (2)

Publication Number Publication Date
CN106956265A true CN106956265A (en) 2017-07-18
CN106956265B CN106956265B (en) 2019-07-09

Family

ID=59483662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710257336.XA Active CN106956265B (en) 2017-04-19 2017-04-19 The execution method and system of robot motion planning based on ROS and OROCOS

Country Status (1)

Country Link
CN (1) CN106956265B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107398902A (en) * 2017-08-02 2017-11-28 合肥中导机器人科技有限公司 robot control method, robot control system
CN109421041A (en) * 2017-08-21 2019-03-05 深圳市优必选科技有限公司 Motion planning and robot control method, robot and the device with store function

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101045298A (en) * 2007-04-12 2007-10-03 武汉科技大学 Apparatus for controlling movement programming of multi-freedom robot
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
US20150149392A1 (en) * 2013-11-27 2015-05-28 Shawn Patrick Bolich Software Application for Managing a Collection of Robot Repairing Resources for a Technician
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101045298A (en) * 2007-04-12 2007-10-03 武汉科技大学 Apparatus for controlling movement programming of multi-freedom robot
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
US20150149392A1 (en) * 2013-11-27 2015-05-28 Shawn Patrick Bolich Software Application for Managing a Collection of Robot Repairing Resources for a Technician
CN105278940A (en) * 2014-07-08 2016-01-27 北京航空航天大学 Robotic hybrid system application frame based on multi-core processor architecture
CN104708517A (en) * 2015-03-24 2015-06-17 北京理工大学 Industrial robot automatic grinding and polishing system based on ROS

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107398902A (en) * 2017-08-02 2017-11-28 合肥中导机器人科技有限公司 robot control method, robot control system
CN107398902B (en) * 2017-08-02 2019-08-16 合肥中导机器人科技有限公司 Robot control method, robot control system
CN109421041A (en) * 2017-08-21 2019-03-05 深圳市优必选科技有限公司 Motion planning and robot control method, robot and the device with store function
CN109421041B (en) * 2017-08-21 2021-05-11 深圳市优必选科技有限公司 Robot motion control method, robot and device with storage function

Also Published As

Publication number Publication date
CN106956265B (en) 2019-07-09

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
CN106950924B (en) Robot circular motion control method and system
CN106985140B (en) Robot point-to-point motion control method and system
WO2020192733A1 (en) Timed task configuration method, server, system and computer-readable storage medium
CN106945044A (en) Robot pause motion control method and system
CN106945045A (en) The communication means and system of robot control based on ROS and OROCOS
CN113805867B (en) Internet of things platform based on visual static script engine
US7554560B2 (en) System for defining network behaviors within application programs
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
CN108427616A (en) background program monitoring method and monitoring device
CN106959694A (en) robot linear motion control method and system
CN110838961B (en) General aviation bus message scheduling system
Warren et al. An automated formal approach to managing dynamic reconfiguration
CN111966465B (en) Method, system, equipment and medium for modifying host configuration parameters in real time
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
CN107517259A (en) A kind of simple Web server implementation method
Zulkernine et al. A compositional approach to monitoring distributed systems
CN109697132A (en) A kind of instantaneous communication system and method for terminal device
Zhou et al. Self-organization of reconfigurable protocol stack for networked control systems
RU2815598C1 (en) Method of creating robotic systems
Trojanek et al. Design of asynchronously stimulated robot behaviours

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