Summary of the invention
It is an object of the present invention to provide a kind of reverse power that can process the complicated tree of the humanoid skeleton of class
Learn the new solution resolved.
According to the first aspect of the invention, it is provided that a kind of IK Solvers calculation method being applied to the humanoid skeleton of class,
Including:
Set the initial attitude of the humanoid skeleton of described class;
Targeted attitude and the resolving parameter in corresponding described joint at least one joint in the humanoid skeleton of described class are set;
IK Solvers resolving process is carried out according to described initial attitude, described targeted attitude and described resolving parameter,
Final carriage to the humanoid skeleton of described class.
Optionally, also include before the initial attitude of the humanoid skeleton of the described class of described setting:
Crucial joint in the humanoid skeleton of class described in labelling and the humanoid skeleton of described class towards;
Humanoid for described class skeleton is set to T-shaped or A shape attitude.
Optionally, described targeted attitude include target location and/or target towards.
Optionally, if described joint cannot arrive target location, transfer the humanoid bone of described class by spurring mechanism
Other positions of frame are so that described joint reaches described targeted attitude.
Optionally, described method also includes the anglec of rotation in described joint is carried out constraint process.
According to the second aspect of the invention, it is provided that a kind of IK Solvers resolver being applied to the humanoid skeleton of class,
Including:
Initial setup module, for setting the initial attitude of the humanoid skeleton of described class;
Goal setting module, described for the targeted attitude and correspondence arranging at least one joint in the humanoid skeleton of described class
The resolving parameter in joint;
Resolve module, for carrying out reverse power according to described initial attitude, described targeted attitude and described resolving parameter
Resolving processes, and obtains the final carriage of the humanoid skeleton of described class.
Optionally, described device also includes:
Mark module, crucial joint in the humanoid skeleton of class described in labelling and the humanoid skeleton of described class towards;
Attitude arranges module, for humanoid for described class skeleton is set to T-shaped or A shape attitude.
Optionally, described targeted attitude include target location and/or target towards.
Optionally, described device also includes pulling module, if cannot arrive target location for described joint, logical
Cross spurring mechanism and transfer other positions of the humanoid skeleton of described class so that described joint reaches described targeted attitude.
Optionally, described device also includes constraints module, for the anglec of rotation in described joint is carried out constraint process.
It was found by the inventors of the present invention that in the prior art, exist and can not process the tree that the humanoid skeleton of class is complicated
Problem, in embodiments of the invention, by the initial attitude of middle corresponding joint, targeted attitude and the correspondence of skeleton humanoid to class
Resolving parameter carry out IK Solvers resolving process, it is possible to make complexity the humanoid skeleton of tree-shaped class arrive its dbjective state,
And arbitrary joint can be carried out individually or whole body IK Solvers resolves.Therefore, the technology that the present invention is to be realized is appointed
That business or the those skilled in the art of technical problem is that to be solved never expect or it is not expected that, therefore the present invention is
A kind of new technical scheme.
By detailed description to the exemplary embodiment of the present invention referring to the drawings, the further feature of the present invention and
Advantage will be made apparent from.
Detailed description of the invention
The various exemplary embodiments of the present invention are described in detail now with reference to accompanying drawing.It should also be noted that unless additionally have
Body illustrates, the parts illustrated the most in these embodiments and positioned opposite, the numerical expression of step and numerical value are not intended to this
The scope of invention.
Description only actually at least one exemplary embodiment is illustrative below, never as to the present invention
And any restriction applied or use.
May be not discussed in detail for technology, method and apparatus known to person of ordinary skill in the relevant, but suitable
In the case of when, described technology, method and apparatus should be considered a part for description.
It is shown here that any occurrence should be construed as merely exemplary with in all examples discussed, and not
It is as restriction.Therefore, other example of exemplary embodiment can have different values.
It should also be noted that similar label and letter represent similar terms, therefore, the most a certain Xiang Yi in following accompanying drawing
Individual accompanying drawing is defined, then need not it is further discussed in accompanying drawing subsequently.
The tree that the humanoid skeleton of class is complicated can not be processed to solve IK Solvers calculation method present in prior art
The problem of shape structure, it is provided that a kind of IK Solvers calculation method being applied to the humanoid skeleton of class and device, according to Fig. 1 originally
Invent the flow chart of a kind of embodiment of a kind of IK Solvers calculation method being applied to the humanoid skeleton of class.
As it is shown in figure 1, the inventive method comprises the steps:
Step S101, sets the initial attitude of the humanoid skeleton of class.
Step S102, arranges the targeted attitude at least one joint in the humanoid skeleton of class and the resolving parameter of correspondence, wherein,
Targeted attitude include target location and/or target towards.
Step S103, carries out IK Solvers resolving process according to initial attitude, targeted attitude and resolving parameter, obtains class
The final carriage of humanoid skeleton.
Concrete, the extremity of skeleton humanoid for class, in one particular embodiment of the present invention, can be to utilize tradition
Solving a triangle method solve.In order to ensure stability of solution, tangent vector field F (p) on Xu Xian structure unit sphere:
Wherein, vector p is any unit vector in three dimensions;RotationFromTo function accepts two parameters,
The two parameter is all the unit vector in three dimensions, and returns the nearest rotation representing first parameter to second parameter
Quaternary number;The visualization result of this vector field is shown in Fig. 1.Using the plane at place, the three of extremity joints as resolving plane, will
Resolve plane normal as the function in direction, end joint, using the resolving plane that determines according to above-mentioned vector field as zero plane.
Appointing to three articulation structures, the attitude angle of this structure is defined as zero plane normal direction and resolves plane normal direction to this structure
Angle.Before carrying out IK Solvers resolving, the attitude angle of structure initial state can be precalculated, obtain calculation result
After, adjust the attitude angle of calculation result to identical with former attitude angle, such that it is able to obtain stable attitudes vibration process.
The vertebra of skeleton humanoid for class, then need to consider simultaneously the target location in end joint and target towards.Due to
Spinal joint number is more, in order to uniquely be solved, always assumes that all of joint rotates around identical axle.In order to make end
End joint arrive target towards, only need to calculate current end joint towards to target towards rotation, and by this rotation
On each joint that angle is assigned in vertebra by certain weight.In order to make arrival target location, end joint, with target location
The direction at place is target, is that the anglec of rotation is distributed in joint by another different weight, and optimizes its angle value by backtracking method,
End joint is finally made to be positioned on target direction.When carrying out actual resolving, it is iteratively performed above-mentioned two step, until result
Convergence.
So, IK Solvers calculation method of the present invention just can apply to the humanoid skeleton of tree-shaped class of complexity, and can
Single IK Solvers resolving is carried out with any joint in the extremity of skeleton humanoid to class and vertebra.Further, in joint
When targeted attitude and resolving continuous parameters change, obtained calculation result is stable, will not produce sudden change.
In order to obtain more real human body attitude, in another specific embodiment of the present invention, the method for the present invention is also
The angle restriction in joint can be defined further.Being different from traditional Eulerian angles to represent, the present invention uses and a kind of new uses angle
Represent rotate method, the span of its three components all [-180 °, 180 °).Appoint to unit quaternion q and a list
Bit vector v, remembers qθFor representing the unit quaternion of the rotation rotating θ around v, θ ∈ [-π, π), make Angle (q)=2*arccos (|
Q.w |), i.e. take the function of the anglec of rotation, make f (θ)=min{Angle (qqθ -1),Angle(qθ -1Q) }, may certify that, f [-
π, π) on be normal function or obtain unique minimum, make f obtain minima θ can be used to represent rotate q rotation on axle v
Component (takes 0) when f is normal function.Calculate q rotational component in x-axis, y-axis and z-axis respectively, just obtain the angle rotated
Represent.User can be respectively provided with maximum and minima to the three of joint component.After IK Solvers has resolved, meter
Calculate each joint towards relative to initially towards variable quantity, after this variable quantity is decomposed into component, by corresponding maximum
Block with minima, then three components after blocking synthesize rotation and be applied to joint towards.In such manner, it is possible to enter one
Step improves the quality of calculation result.
Further, when a certain body part cannot arrive target location, can be to transfer other by spurring mechanism
Body part, so that arbitrary joint all may affect whole joints of the humanoid skeleton of class, it is thus achieved that whole body IK Solvers effect.
Pull on vertebra end joint according to organization of human body, arm and head, and vertebra and leg pull on pelvis.To calculate left finesse
As a example by the arrival problem in portion, after whole body parts have resolved, check that the physical location in wrist joint arrives target location
Translation vector, if target location could not be arrived, then along the physical location in this vector translation vertebra end joint, and it is set to
New vertebra target location, resolves again.If vertebra still fails to arrive target location, further
Pull pelvis.When multiple joints pull simultaneously, then by its value pulling parameter, each translation vector is weighted averagely, will
Result is applied to be pulled on joint, and therefore, the targeted attitude in any joint and resolving parameter all may affect the humanoid skeleton of class
Whole joints, thus can skeleton humanoid to class carry out whole body IK Solvers resolve.
On this basis, also needed set the initial attitude of the humanoid skeleton of class in step S101 before to initialize whole resolving and be
System, comprises the following steps:
Crucial joint in the humanoid skeleton of marking class and the humanoid skeleton of class towards;And,
Humanoid for class skeleton is set to T-shaped or A shape attitude.
Wherein, each crucial joint of labelling refers to some joint marker in humanoid for class skeleton is that pelvis, vertebra initiate
Joint, vertebra end joint (i.e. cervical region initiates joint), vertebra end joint, left and right eyeball, right and left shoulders joint, left and right elbow close
Any one in joint, right-hand man's carpal joint, left and right hip joint, left and right knee joint and ankle joint, left and right, if target class people
Any one in the most corresponding above-mentioned crucial joint, some joints in shape skeleton, can not in addition labelling, i.e. without class people
In shape skeleton, each joint is all marked.
Concrete, the humanoid skeleton of class towards such as including front and top.
Present invention also offers a kind of IK Solvers resolver being applied to the humanoid skeleton of class, Fig. 3 is the present invention one
Plant a kind of frame principle figure implementing structure of the IK Solvers resolver being applied to the humanoid skeleton of class, as it is shown on figure 3, this
Invention device 300 includes initial setup module 301, goal setting module 302 and resolves module 303, this initial setup module 301
For setting the initial attitude of the humanoid skeleton of class;This goal setting module 302 is used for arranging in the humanoid skeleton of class at least one and closes
The targeted attitude of joint and the resolving parameter in corresponding joint;This resolving module 303 is for according to initial attitude, targeted attitude and resolving
Parameter carries out IK Solvers resolving process, obtains the final carriage of the humanoid skeleton of class.
In one particular embodiment of the present invention, this device 300 also includes that mark module and attitude arrange module, this mark
The note module crucial joint in the humanoid skeleton of marking class and the humanoid skeleton of class towards;This attitude arranges module for inciting somebody to action
The humanoid skeleton of class is set to T-shaped or A shape attitude.
Wherein, targeted attitude include target location and/or target towards.
Further, this device 300 also includes pulling module, if this pulls module cannot arrive target position for joint
When putting, transfer other positions of the humanoid skeleton of class so that joint reaches targeted attitude by spurring mechanism.
On this basis, this device 300 also includes constraints module, for the anglec of rotation in joint is carried out constraint process.
The present invention can be system, method and/or computer program.Computer program can include computer
Readable storage medium storing program for executing, containing for making processor realize the computer-readable program instructions of various aspects of the invention.
Computer-readable recording medium can be to keep and to store instruction tangible used by instruction execution equipment
Equipment.Computer-readable recording medium such as may be-but not limited to-storage device electric, magnetic storage apparatus, optical storage
Equipment, electromagnetism storage device, semiconductor memory apparatus or the combination of above-mentioned any appropriate.Computer-readable recording medium
More specifically example (non exhaustive list) including: portable computer diskette, hard disk, random access memory (RAM), read-only deposits
Reservoir (ROM), erasable type programmable read only memory (EPROM or flash memory), static RAM (SRAM), portable
Compact disk read only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical coding equipment, such as on it
Storage has the punch card of instruction or groove internal projection structure and the combination of above-mentioned any appropriate.Calculating used herein above
Machine readable storage medium storing program for executing is not construed as instantaneous signal itself, the electromagnetic wave of such as radio wave or other Free propagations, logical
Cross waveguide or the electromagnetic wave (such as, by the light pulse of fiber optic cables) of other transmission mediums propagation or pass through wire transfer
The signal of telecommunication.
Computer-readable program instructions as described herein can from computer-readable recording medium download to each calculate/
Processing equipment, or download to outer computer or outer by network, such as the Internet, LAN, wide area network and/or wireless network
Portion's storage device.Network can include copper transmission cable, fiber-optic transfer, be wirelessly transferred, router, fire wall, switch, gateway
Computer and/or Edge Server.Adapter or network interface in each calculating/processing equipment receive meter from network
Calculation machine readable program instructions, and forward this computer-readable program instructions, for the meter being stored in each calculating/processing equipment
In calculation machine readable storage medium storing program for executing.
For perform the present invention operation computer program instructions can be assembly instruction, instruction set architecture (ISA) instruction,
Machine instruction, machine-dependent instructions, microcode, firmware instructions, condition setup data or with one or more programming languages
Source code that combination in any is write or object code, described programming language includes OO programming language such as
Smalltalk, C++ etc., and the procedural programming languages of routine such as " C " language or similar programming language.Computer
Readable program instructions can perform the most on the user computer, perform the most on the user computer, as one solely
Vertical software kit performs, part part on the user computer performs or on the remote computer completely at remote computer
Or perform on server.In the situation relating to remote computer, remote computer can be by the network packet of any kind
Include LAN (LAN) or wide area network (WAN) is connected to subscriber computer, or, it may be connected to outer computer (such as profit
Internet connection is passed through) with ISP.In certain embodiments, by utilizing computer-readable program instructions
Status information carry out personalized customization electronic circuit, such as Programmable Logic Device, field programmable gate array (FPGA) or can
Programmed logic array (PLA) (PLA), this electronic circuit can perform computer-readable program instructions, thus realize each side of the present invention
Face.
Referring herein to method according to embodiments of the present invention, device (system) and computer program flow chart and/
Or block diagram describes various aspects of the invention.Should be appreciated that flow chart and/or each square frame of block diagram and flow chart and/
Or the combination of each square frame in block diagram, can be realized by computer-readable program instructions.
These computer-readable program instructions can be supplied to general purpose computer, special-purpose computer or other programmable data
The processor of processing means, thus produce a kind of machine so that these instructions are by computer or other programmable data
When the processor of processing means performs, create the merit of regulation in the one or more square frames in flowchart and/or block diagram
The device of energy/action.These computer-readable program instructions can also be stored in a computer-readable storage medium, these refer to
Order makes computer, programmable data processing means and/or other equipment work in a specific way, thus, storage has instruction
Computer-readable medium then includes a manufacture, and it includes in the one or more square frames in flowchart and/or block diagram
The instruction of the various aspects of the function/action of regulation.
Can also computer-readable program instructions be loaded into computer, other programmable data processing means or other
On equipment so that perform sequence of operations step on computer, other programmable data processing means or miscellaneous equipment, to produce
Raw computer implemented process, so that perform on computer, other programmable data processing means or miscellaneous equipment
Function/the action of regulation in one or more square frames in instruction flowchart and/or block diagram.
Flow chart and block diagram in accompanying drawing show the system of multiple embodiments according to the present invention, method and computer journey
Architectural framework in the cards, function and the operation of sequence product.In this, each square frame in flow chart or block diagram can generation
One module of table, program segment or a part for instruction, a part for described module, program segment or instruction comprises one or more use
Executable instruction in the logic function realizing regulation.At some as in the realization replaced, the function marked in square frame is also
Can occur to be different from the order marked in accompanying drawing.Such as, two continuous print square frames can essentially be held substantially in parallel
OK, they can also perform sometimes in the opposite order, and this is depending on involved function.It is also noted that block diagram and/or
The combination of the square frame in each square frame in flow chart and block diagram and/or flow chart, can be with performing the function of regulation or dynamic
The special hardware based system made realizes, or can realize with the combination of specialized hardware with computer instruction.Right
It is well known that for those skilled in the art, realized by hardware mode, realized by software mode and by software and
The mode of combination of hardware realizes being all of equal value.
Being described above various embodiments of the present invention, described above is exemplary, and non-exclusive, and also
It is not limited to disclosed each embodiment.In the case of the scope and spirit without departing from illustrated each embodiment, for this skill
For the those of ordinary skill in art field, many modifications and changes will be apparent from.The selection of term used herein, purport
Explaining the principle of each embodiment, actual application or the technological improvement to the technology in market best, or making this technology lead
Other those of ordinary skill in territory is understood that each embodiment disclosed herein.The scope of the present invention is limited by claims
Fixed.