Force-feedback control method and control system
Technical field
The present invention relates to the technical field of virtual reality more particularly to force-feedback control methods.
Background technique
Virtual reality (VR) technology is a kind of by a series of input-output equipment constructed mould in a computer
Intend the virtual environment of reality, user can be roamed in virtual environment by input equipment and with pair in virtual environment
As interacting;And the five senses such as the touching of the audiovisual in virtual environment can be fed back to user by output equipment, reach user
A kind of immersion experience on the spot in person.
Power/tactile is virtual existing improving as the channel uniquely in the big sense organ of human body five with information bidirectional transfer performance
Have the function of can not be substituted in the property immersed of real human-computer interaction.As power/tactile interactive tool, the property of force feedback equipment
An important factor for measuring force feedback system Man machine interaction can be become.In force feedback equipment, including have certain free
The mechanical structure interacted with user is spent, and the control system for controlling mechanical structure is particularly critical for improving force feedback performance.Cause
This, has very important meaning to the research of force feedback equipment control system and method.
Force feedback equipment in the prior art, such as the Touch X product of 3D System company are series-mode frame,
Have the shortcomings that rigidity is low, location accuracy is insufficient;The Delta series of products of Force Dimensions company, booting need
Calibration, operation is more troublesome, further, since its using motor angle, need to increase in angle calculation one it is converted
Journey reduces accuracy.
Summary of the invention
The purpose of the present invention is to provide force-feedback control method and control systems, it is intended to solve virtual in the prior art
Real force feedback equipment has positional accuracy low, leads to the problem that user experience is poor.
The invention is realized in this way force-feedback control method is provided, for controlling equipment end in virtual reality system
End, comprising the following steps: kinematics resolves: acquiring each joint angles signal in the equipment end and equipment pose resolves;In void
It is resolved in quasi- reality according to kinematics, shows the corresponding agent point position in equipment end described in simultaneously real-time update;Feedback force output
It resolves: when the agent point interacts in the virtual reality with the collision of other virtual objects, calculating size and the side of feedback force
To;It is exported according to feedback force and resolves the input current value for obtaining each motor, drive corresponding motor operating, make the equipment end
Feedback force needed for the output of end.
Further, further comprising the steps of: to be resolved according to equipment pose, calculating balances the equipment under each pose
Motor current value required for end, and be added in electric current needed for feedback force exports.
Further, during kinematics resolves further include: capture button signal simultaneously grabs posture analysis.
Further, equipment pose resolving specifically includes: to the ternary quadratic nonlinearity equation group of parallel translational part,
Terminal position is calculated using Newton iteration method building newton iteration equation;Series connection translation part is calculated by D-H matrix
Terminal angle.
Further, the size and Orientation for calculating feedback force specifically includes: using Newton―Leibniz formula from required output
Virtual environment feedback force calculate equipment end each rod piece stress and each joint torque.
The present invention also provides control systems, comprising: angle button signal acquisition module, for acquiring execution module
Angle signal and push button signalling, the angle signal are practical joint angles;Human-computer interaction module, building is empty in a computer
Quasi- reality, display interaction scenarios, the corresponding agent point of the execution module and virtual objects receive the acquisition angles letter
Number and the push button signalling, in real time with the new agent point position, and counted when the agent point is interacted with the virtual objects
The size and Orientation for calculating feedback force exports solution process by feedback force and obtains the input current of the execution module;Drive mould
Block, including multiple servo-drivers, it is corresponding to control multiple executive components;Power plant module, including regulated power supply, for powering;It holds
Row module, including multiple executive components;Feedback force acquisition module acquires the execution module by mechanics sensor
Feedback force size;Control module is in communication with each other with the human-computer interaction module, receives the angle button signal acquisition module
With the feedback force acquisition module data, Xiang Suoshu drive module sends data.
Further, the angle button signal includes: absolute type encoder, to the rotation angle of the executive component,
The rotation angle in equipment joint is encoded, and is read by the control module;
Switch key reads the state whether key in execution module is pressed, and is read by the control module.
Further, the power plant module is DC power supply or ups power.
Further, the control module carries out data communication by USB or SPI interface and host computer, to the number of transmitting-receiving
According to being verified, the signal that the angle button signal acquisition module provides can be read, maintenance respectively drives multiple execution objects
Drive module.
Further, the servo-driver realizes that Dual-encoder is read using CAN communication mode, the communication side CAN
Formula includes CANopen agreement or custom protocol, and the Dual-encoder is to auxiliaring coding on motor end encoder and joint
Device is read out.
Compared with prior art, feedback provided in the present invention and control system, in the resolving of equipment pose
The angle signal used eliminates common line transmission system in force feedback equipment for the actual angle signal in each equipment joint
The driving error and drive line of introducing are skidded, joint angles calculate inaccuracy caused by flexible deformation, so that agent point exists
Location updating in virtual environment is more accurate, optimizes user experience.
Detailed description of the invention
Fig. 1 is the control system framework schematic diagram of the embodiment of the present invention
Fig. 2 is the force-feedback control method flow schematic diagram of the embodiment of the present invention
Fig. 3 is that the kinematics of the embodiment of the present invention resolves schematic diagram
Fig. 4 is that the gravity compensation of the embodiment of the present invention realizes schematic diagram.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments,
The present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used to explain this hair
It is bright, it is not intended to limit the present invention.
The realization of the present embodiment is described in detail below in conjunction with specific attached drawing.
Embodiment one
Force-feedback control method is provided in this implementation, in virtual reality system control directly interact with user
Equipment end generates force feedback effect.
As shown in Figures 2 to 4, force-feedback control method specifically includes the following steps:
Kinematics resolves: acquisition equipment angle at the end signal and the resolving of equipment pose, wherein angle signal is each equipment
Joint angles.
It is resolved in virtual reality according to kinematics, shows the simultaneously corresponding agent point in real-time update equipment end;Work as equipment
It when end is mobile, is shown in the virtual reality of user at the moment, agent point also moves, and allows users to have and explore
The experience of virtual reality.
Feedback force output resolves: when agent point interacts in virtual reality with the collision of other virtual objects, calculating feedback force
Size and Orientation
It is exported according to feedback force and resolves the input current value for obtaining each motor, driven corresponding motor operating, keep equipment last
Feedback force needed for the output of end.
From the foregoing it can be that the force-feedback control method in the present embodiment, the angle used in the resolving of equipment pose
Signal is the actual angle signal in each equipment joint, eliminates the transmission that common line transmission system introduces in force feedback equipment
Error and drive line skid, joint angles calculate inaccuracy caused by flexible deformation, so that agent point is in virtual environment
Location updating it is more accurate, optimize user experience.
Preferably, in kinematics resolving, further includes: capture button signal grabs posture analysis.Push button signalling, that is, user
The signal for whether needing to grab, to execute relevant action.
Preferably, force-feedback control method is further comprising the steps of:
It is resolved according to equipment pose, calculates the motor current value required for balancing equipment end under each pose, and be added
Feedback force export needed in electric current, carry out in real time dead-weight balanced, reduce the influence of user experience feedback force greatly, into
One-step optimization usage experience.
The resolving of equipment pose specifically includes: to the ternary quadratic nonlinearity equation group of parallel translational part, being changed using newton
Terminal position is calculated for method building newton iteration equation;Terminal angle is calculated by D-H matrix to series connection translation part,
Equipment end pose is solved using the process that iterative numerical calculates.
The size and Orientation for calculating feedback force specifically includes: the virtual environment using Newton―Leibniz formula from required output
Feedback force calculate equipment end each rod piece stress and each joint torque, finally calculate the current value size that input.
Embodiment two
As shown in Figures 1 to 4, control system is provided in the present embodiment, comprising: angle button signal acquisition module 1,
Human-computer interaction module 3, drive module 5, power plant module 4, execution module 6, feedback force acquisition module 7, control module 2.
Wherein, control module 2 is in communication with each other with human-computer interaction module 3, accepts angle push button signalling acquisition module 1 and anti-
The data for presenting power acquisition module 7 send data to drive module 5.
Angle button signal acquisition module 1 is used to acquire the angle signal and push button signalling of execution module 6, angle signal
For practical joint angles, human-computer interaction module 3 is uploaded to by control module 2.Human-computer interaction module 3 constructs in a computer
Virtual reality, display interaction scenarios, the corresponding agent point of execution module 6 and virtual objects, receive acquisition angles signal and
After push button signalling, size and the side of feedback force are calculated with new agent point position and when agent point is interacted with virtual objects in real time
To exporting solution process by feedback force and obtain the input current of execution module 6, pass through the output of control module 2 to drive module
5.Power plant module 4 includes regulated power supply, and drive module 5 controls the output of power plant module 4 according to input current above-mentioned.It executes
Module 6 includes multiple executive components, and drive module 5 includes multiple servo-drivers, corresponding to control multiple executive components.
Feedback force acquisition module 7 acquires the feedback force size of execution module 6 by mechanics sensor, passes through control module 2
It is uploaded to human-computer interaction module 3, completes closed loop.
Control system in the present embodiment is eliminated by the actual angle signal in 1 joint of angle button signal acquisition module
The driving error and drive line that common line transmission system introduces in force feedback equipment are skidded, caused by flexible deformation
Joint angles calculate inaccuracy, so that location updating of the agent point in virtual environment is more accurate, optimization user uses body
It tests.
Specifically, angle button signal includes: absolute type encoder, to the rotation angle of executive component, equipment joint
Rotation angle is encoded, and is read by control module 2;Whether switch key, the key read in execution module 6 are pressed
State, and read by control module 2.
Control module 2 is one piece of master board, can cross the interfaces such as USB, SPI and host computer carries out data communication, can be to receipts
The data of hair carry out CRC check, can maintain system stable operation by house dog, can reading angular push button signalling acquisition module
11 signals provided can be safeguarded and respectively drive multiple 5 objects of drive module for executing object.
Servo-driver realizes that Dual-encoder is read using CAN communication mode, and CAN communication mode includes CANopen agreement
Or custom protocol, Dual-encoder are read out auxiliary coder on motor end encoder and joint.
Power plant module 4 can be DC power supply or ups power.
Force-feedback control method and control system in embodiment one and embodiment two, the force feedback based on Delta mechanism
Equipment is controlled the 6DOF human-computer interaction tool formed with Delta parallel mechanism with Three Degree Of Freedom serial mechanism
System, 6DOF human-computer interaction tool have translation three freedom and rotation Three Degree Of Freedom, wherein translation three freedom is determined
Locking equipment terminal position, rotation Three Degree Of Freedom determine equipment terminal angle, feedback are effectively felt on translation three freedom.Such as Fig. 2
Shown, force-feedback control method and control system are broadly divided into three kinematics resolving, feedback force output, gravity compensation aspects.
System acquires the reading of 9 absolute encoders by angle button signal acquisition module 11, wherein three absolute encoders are in electricity
Machine exports shaft end, and three absolute encoders are on Delta mechanism joint, and the other three absolute encoder terminal tandem three is certainly
By on degree joint, whether key wishes to carry out the action behavior of crawl for capturing user on end hand grip.Control module 2
The reading of each absolute encoder and the state of key are obtained by CAN instruction, is sent to man-machine friendship by SPI communication modes
Mutual module 3, human-computer interaction module 3 resolve to obtain position and the posture of equipment end by kinematics, and in human-computer interaction module
Middle real-time display agent point HIP, when equipment terminal agents point HIP and other dummy object objects generation in virtual environment are touched
When hitting interactive, the collision detection engine in human-computer interaction module 3 can calculate size and the direction of feedback force;Human-computer interaction mould
Block 3 calculates each motor current value to be inputted by feedback force output, and current value is handed down to control module 2, controls
Molding block 2 is sent to drive module 55 by CAN instruction, to drive 66 output torque of execution module then needed for module
Feedback force.Since equipment self-weight will lead to fatigue when user uses, impression of the user to feedback force size, therefore equipment are influenced
Gravity compensation become particularly significant.Gravity compensation is realized by obtaining the current pose of equipment, is calculated and is mentioned required for motor
The torque of confession then obtains the electric current inputted required for motor, to reach the balance of equipment self-weight.
As shown in figure 3, kinematic solution point counting is two parts, i.e. the processing to the processing of angle signal and to push button signalling,
Two parts are divided into the processing of angle signal again, to the ternary quadratic nonlinearity equation group of parallel translational part, are changed using newton
Newton iteration equation is constructed for method, the numerical computation of computer is made full use of to iterate to calculate out terminal position;It is flat to series connection
Dynamic part calculates terminal angle by D-H method (D-H matrix: Denavit-Hartenberg Matrix).It finally obtains and sets
The pose of standby end and user grab behavior.
As shown in Fig. 2, feedback force output is resolved using Newton―Leibniz formula from the virtual environment feedback force of required output
Each rod piece stress of force feedback equipment and each joint torque out, then calculate electric current needed for motor, input institute by power plant module 44
After needing electric current, virtual environment feedback force can be simulated.The power and virtual environment feedback force more one experienced for user
It causes, feedback force acquisition module 7, feedback force acquisition is mounted between Three Degree Of Freedom parallel moving mechanism and three-degree-of-freerotation rotation mechanism
Module 7 is a force snesor, can acquire the interaction force between force feedback equipment and user in real time, feed back to control module
2, the current interaction force detected is uploaded to this human-computer interaction module 3 again by control module 2, is adjusted and is controlled by PID
The size of system control motor current value, the power for experiencing user are more accurate.
As shown in figure 4, gravity compensation is realized i.e. by obtaining the current pose of equipment online, calculate defeated needed for motor
Torque and current value out are added in electric current needed for feedback force exports, can eliminate equipment own wt and experience feedback force to user
It influences, improves the transparency of equipment significantly.
The above is merely preferred embodiments of the present invention, be not intended to limit the invention, it is all in spirit of the invention and
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within principle.