CN115319803A - Simulation method, simulation device, readable storage medium and simulation test platform - Google Patents

Simulation method, simulation device, readable storage medium and simulation test platform Download PDF

Info

Publication number
CN115319803A
CN115319803A CN202210842077.8A CN202210842077A CN115319803A CN 115319803 A CN115319803 A CN 115319803A CN 202210842077 A CN202210842077 A CN 202210842077A CN 115319803 A CN115319803 A CN 115319803A
Authority
CN
China
Prior art keywords
simulation
model
laser
simulation model
laser beam
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.)
Pending
Application number
CN202210842077.8A
Other languages
Chinese (zh)
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.)
KUKA Robot Manufacturing Shanghai Co Ltd
Original Assignee
KUKA Robot Manufacturing Shanghai 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 KUKA Robot Manufacturing Shanghai Co Ltd filed Critical KUKA Robot Manufacturing Shanghai Co Ltd
Priority to CN202210842077.8A priority Critical patent/CN115319803A/en
Publication of CN115319803A publication Critical patent/CN115319803A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J19/00Accessories fitted to manipulators, e.g. for monitoring, for viewing; Safety devices combined with or specially adapted for use in connection with manipulators
    • B25J19/0095Means or methods for testing manipulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Numerical Control (AREA)
  • Manipulator (AREA)

Abstract

The invention provides a simulation method, a simulation device, a readable storage medium and a simulation test platform. The simulation method comprises the following steps: generating a first simulation model of the mechanical arm, a second simulation model of the laser tracker and a third simulation model of the environmental object, wherein a target model component is arranged on the first simulation model and is a simulation model of the positioning piece; acquiring parameter information of a laser tracker; generating a simulation laser beam according to the parameter information, wherein the simulation laser beam is emitted to the target model component from the second simulation model; controlling the first simulation model to move according to a preset track; and detecting a collision result of the simulation laser beam and the first simulation model and/or the third simulation model, and determining a simulation result according to the collision result. According to the method and the device, the hardware architecture of the robot platform is not required to be adjusted or built actually, hardware waste is avoided, time cost consumed in the process of program test verification is reduced, and test and verification efficiency is improved.

Description

Simulation method, simulation device, readable storage medium and simulation test platform
Technical Field
The invention relates to the technical field of simulation, in particular to a simulation method, a simulation device, a readable storage medium and a simulation test platform.
Background
In the related art, an industrial robot is an automated production apparatus, and in a robot system, a laser tracker is provided to perform measurement work, thereby ensuring the machining accuracy of the robot. In order to ensure accurate measurement of the laser tracker, when a complex working scene is carried out, after a working program of the robot is set, and the robot needs to test whether a laser beam of the laser tracker is transmitted between a tested target and the laser tracker without barriers when the robot moves according to the program, hardware layout of a robot workstation needs to be adjusted repeatedly in the testing process, and time cost is high.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art or the related art.
To this end, a first aspect of the invention proposes a simulation method.
A second aspect of the present invention proposes a simulation apparatus.
A third aspect of the present invention proposes a simulation apparatus.
A fourth aspect of the invention is directed to a readable storage medium.
A fifth aspect of the present invention provides a simulation test platform.
A sixth aspect of the invention proposes a computer program product.
In view of the above, a first aspect of the present invention provides a simulation method for a robot system, where the robot system includes a mechanical arm and a laser tracker, the mechanical arm is provided with a positioning element, and the laser tracker is used to obtain position information of the positioning element, and the method includes:
generating a first simulation model of the mechanical arm, a second simulation model of the laser tracker and a third simulation model of the environmental object, wherein a target model component is arranged on the first simulation model and is a simulation model of the positioning piece; acquiring parameter information of a laser tracker; generating a simulation laser beam according to the parameter information, wherein the simulation laser beam is emitted to the target model component from the second simulation model; controlling the first simulation model to move according to a preset track; and detecting a collision result of the simulation laser beam and the first simulation model and/or the third simulation model, and determining a simulation result according to the collision result.
In the technical scheme, a robot system, namely a robot workstation, is provided with a mechanical arm for processing a workpiece in the robot workstation, a positioning part is arranged at the tail end of the mechanical arm, specifically, the positioning part can be a reflecting part, and a laser tracker of the robot workstation is used for measuring position information of the positioning part by emitting a laser beam to the reflecting part and according to a received reflected light beam, so that the pose of the mechanical arm is determined.
In the working process of the robot workstation, the compiled working program needs to be called to control the mechanical arm to move according to the movement track specified by the working program, so that the workpiece is processed. In the process, in order to ensure the accurate measurement of the laser tracker and further ensure the working precision of the robot, the laser tracker and the tracked target need to be ensured, namely, no obstacle blocking the transmission of the laser beam exists between the positioning parts, wherein the obstacle may be an environmental object or a mechanical arm of the robot.
Therefore, after the working program of the robot is written, the working program needs to be tested on the robot workstation to investigate whether the laser beam emitted by the laser tracker is blocked by an obstacle or not in the movement process of the robot, if so, the working program of the robot needs to be adjusted, and in the process, the hardware setting of the robot workstation needs to be adjusted repeatedly, so that the time cost is high.
The embodiment of the application provides a simulation method, which comprises the steps of establishing a three-dimensional model of a robot workstation to be tested in a simulation experiment platform, wherein the three-dimensional model comprises a laser tracker, a mechanical arm and a simulation model of an environmental object, and a target model assembly corresponding to a positioning piece is arranged on a first simulation model of the mechanical arm. The working process of the robot platform is simulated through the simulation models, and the laser tracker tracks and positions the positioning piece on the mechanical arm, so that whether the laser beam emitted by the laser tracker is shielded by the mechanical arm or an environmental object or not in the motion process of the mechanical arm is judged.
Because the simulation model can virtually set up various different test scenes by calling corresponding program functions, the hardware architecture of the robot platform does not need to be adjusted or set up actually, the time cost consumed in the test process can be obviously reduced, and the test and verification efficiency is improved.
Specifically, in the simulation process, first, a first simulation model, a second simulation model, and a third simulation model are generated, respectively. The first simulation model is a simulation model of a mechanical arm of the robot, the second simulation model is a simulation model of the laser tracker, and the third simulation model is a simulation model of an environmental object which possibly blocks a laser beam and exists in the environment.
After the model is generated, parameter information of laser tracker hardware set in an actual robot workstation, which indicates performance parameters, setting manner, and the like of the laser tracker, is acquired. After the parameter information is set, the simulated laser tracker emits virtual simulated laser light to the simulated positioning piece, namely the target model assembly, and the starting point of the simulated laser light is the simulated laser tracker, namely the second simulation model.
At this time, the first simulation model is controlled according to the written work program, and the motion is performed according to the preset track specified by the work program, so that the motion of the mechanical arm when the workpiece is processed is simulated. In the motion process of the first simulation model, the simulation system continuously detects whether the laser light of the target model assembly shot by the second simulation model collides with the first simulation model, namely the mechanical arm body, or the third simulation model, namely the environmental object.
It can be understood that if the simulated laser beam collides with the first simulation model or the third simulation model, it indicates that, in the motion process of the mechanical arm, the laser light emitted by the laser tracker to the positioning element is shielded by the mechanical arm body or an environmental object, so that the laser tracker loses the tracking and positioning of the positioning element, and at this time, the working procedure of the robot worktable needs to be adjusted to change the motion path of the mechanical arm.
If the laser light does not collide with the first simulation model and the third simulation model, it can be shown that the laser light emitted by the laser tracker to the positioning piece can not be shielded by the mechanical arm body or an environmental object in the motion process of the mechanical arm, and the current test working procedure is reliable.
According to the simulation laser tracker based on simulation, the simulation laser beam of the simulation laser tracker and the simulated mechanical arm model and the collision result of the environment object model are used for testing the working program for controlling the movement of the mechanical arm, the whole testing process depends on a simulation algorithm, the actual hardware framework of the robot platform is not required to be adjusted or set up, for example, the actual camera position is not required to be adjusted, so that the arrangement of an adaptive fixing plate and a mounting seat for a new camera position is omitted, the machining cost or the 3D printing cost is reduced, the hardware waste generated in the process of repeated debugging is avoided, the hardware cost of debugging is reduced, the time cost consumed in the process of program test verification is reduced, and the testing and verifying efficiency is improved.
In addition, the simulation method in the above technical solution provided by the present invention may also have the following additional technical features:
in the above technical solution, the parameter information includes: the positioning device comprises position information of the laser tracker, position and attitude information of the positioning piece, an incident angle threshold and/or a distance range between the laser tracker and the positioning piece.
In the technical scheme, the parameter information of the laser tracker specifically includes position information, the position information specifically includes a setting position of the laser tracker in space, and the position information can be defined as a 4 × 1 matrix SourcePosition.
The parameter information further includes a tracked target of the laser tracker, that is, pose information of the positioning element, where the pose information includes a spatial position and a spatial attitude of the positioning element, and may be specifically defined as 4 × 4 matrix data TargetMatrix.
The parameter information further includes an incident angle, specifically, the incident angle threshold refers to an incident angle of the laser that the positioning element can receive, and after the incident angle of the laser ray exceeds the threshold, the reflected laser may not be received by the laser tracker, that is, the reflected laser is formed as an invalid laser, and the incident angle threshold may be specifically defined as real number data acceptable angle.
The parameter information also includes the distance range between the laser tracker and the positioning element, specifically, the distance range includes the minimum distance between the laser tracker and its tracking target, that is, the positioning element, and also includes the maximum distance between the laser tracker and its tracking target, that is, the positioning element. Wherein, the minimum distance can be defined as real data ClipNear, and the maximum distance can be defined as real data ClipFar.
After parameter information of the laser tracker is determined, a working program for controlling the motion of the mechanical arm is tested by judging whether a simulated laser beam collides with the simulated first simulation model and the simulated third simulation model, a simulation algorithm is relied on in the whole testing process, the hardware framework of the robot platform does not need to be adjusted or set up actually, time cost consumed in the process of program testing and verification is reduced, and testing and verification efficiency is improved.
In any of the above technical solutions, generating a simulated laser beam according to the parameter information includes: determining a cylindrical model according to the position information of the laser tracker, the position and posture information of the positioning piece and the preset radius; and determining the simulated laser beam according to the cylindrical model.
In this technical scheme, in the actual work process, laser tracker can continuously be to setting element transmission laser beam, and laser beam includes many laser ray including laser beam, and laser beam can follow the reflection light path reflection after firing the setting element surface, and laser tracker realizes the pursuit and the location to the spatial position of setting element according to reflection light.
In the simulation system, the laser beam is simulated by a cylindrical model. Specifically, between the second simulation model corresponding to the laser tracker and the target model component corresponding to the positioning pieceSimulating a cylinder model, wherein the initial position of the cylinder model is the light source position P of the second simulation model t The ending position of the cylindrical model is the position P of the target model building name s The radius of the cylinder model is a preset value r, and the length of the cylinder model is | P t -P s |。
The working program for controlling the motion of the mechanical arm is tested by judging whether the cylindrical model collides with the first simulation model or the third simulation model, the whole testing process depends on a simulation algorithm, the actual hardware architecture of the robot platform is not required to be adjusted or set up, the time cost consumed in the program testing and verifying process is reduced, and the testing and verifying efficiency is improved.
In any of the above technical solutions, detecting a collision result of the simulated laser beam with the first simulation model and/or the third simulation model includes: acquiring the number of intersection points of the cylindrical model and the first simulation model and/or the third simulation model; and determining a collision result according to the number of the intersection points.
In the technical scheme, the cylinder model is a model for simulating the laser beam, and the position and the like of the simulated laser beam in the simulation space are expressed through the cylinder model, so that the simulated laser beam is visualized. Wherein, whether the intersection points exist between the Yuan-Yuan model and the first simulation model and the third simulation model can reflect whether the actual laser beam is emitted to the mechanical arm or the environmental object, therefore, based on the number of the intersection points between the cylindrical model and the first simulation model and the third simulation model, whether the laser beam of can accurately reflecting directive setting element can be sheltered from by the barrier, need not the actual hardware framework to the robot platform and adjusts or builds, reduced the time cost that the procedure test verified in-process consumed, improved the efficiency of test and verification.
In any of the above technical solutions, the collision result is determined according to the number of the intersection points: determining that the collision result is the collision under the condition that the number of the intersection points is not zero; and in the case that the number of the intersection points is zero, determining that the collision result is no collision.
In the technical scheme, the cylindrical model is a model for simulating the laser beam, if intersection points exist between the cylindrical model and the first simulation model or the third simulation model, namely the number of the intersection points is not zero, the intersection points represent that at least part of the laser beam can be shielded by the mechanical arm or an environmental object in the actual working process, so that at least part of the laser beam cannot reach the positioning piece, and the collision result is specifically determined to be collision.
And if the cylinder model does not have the nodical with first simulation model or third simulation model, nodical quantity is zero promptly, then represents in the actual work process, and the laser beam can not sheltered from by arm itself or environment object, and on whole laser beam all can reach the setting element, judge this moment that the collision result specifically is no collision.
According to the embodiment of the application, whether the actual laser beam can be shielded by the barrier or not is judged based on the number of intersection points of the cylindrical model, the first simulation model and the third simulation model, the hardware framework of the robot platform does not need to be adjusted or built actually, time cost consumed in the program test verification process is reduced, and test and verification efficiency is improved.
In any of the above technical solutions, the determining the simulated laser beam includes: determining the incident angle of the simulation ray; determining the simulation ray as an effective ray under the condition that the incident angle is less than or equal to the incident angle threshold; and determining the simulation ray as an invalid ray under the condition that the incident angle is larger than the incident angle threshold value.
In the technical scheme, in the actual working process of the robot workstation, the laser beam emitted to the positioning part by the laser tracker is actually formed by a plurality of laser rays, so that in the simulation system, the simulation laser beam also comprises a plurality of simulation rays, and the simulation rays correspond to the actual laser rays.
The laser tracker operates on the principle of emitting a laser beam to an object to be tracked, and determining the position of the object to be tracked based on the reflected laser beam. The incident angle of the laser beam specifically refers to the incident angle of the laser received by the positioning element, and when the incident angle exceeds a certain value, specifically exceeds an incident angle threshold, the reflected laser may not be received by the laser tracker, that is, the reflected laser is formed as an invalid laser.
Therefore, if the incident angle is less than or equal to the incident angle threshold, the reflected laser light representing the laser ray can be received by the laser tracker, at which time the corresponding simulated ray is determined to be a valid ray. If the incident angle is larger than the incident angle threshold value, the reflected laser representing the laser ray cannot be received by the laser tracker, and at the moment, the corresponding simulation ray is judged to be an invalid ray.
By restricting the incident angle, invalid rays can be reduced, and the tracking precision is improved.
In any of the above technical solutions, after determining the incident angle of the simulated ray, the method further includes: and canceling the display of the invalid ray, and generating a simulation laser beam according to the valid ray.
In the technical scheme, when the incident angle is larger than the incident angle threshold, the reflected laser representing the laser ray cannot be received by the laser tracker, the simulation ray is determined to be an invalid ray, the invalid simulation ray is cancelled and displayed, and the system overhead can be reduced. If the incident angle is smaller than or equal to the incident angle threshold, the corresponding simulation ray is judged to be an effective ray, and the simulation laser beam is generated based on the effective ray, so that invalid rays can be reduced, and the tracking accuracy is improved.
In any of the above technical solutions, determining an incident angle of the simulated ray includes: and determining the incident angle according to the position information of the laser tracker, the pose information of the positioning piece and the preset vector.
In this technical solution, the preset vector may be a normal vector of a side surface of the positioning element facing the laser tracker. And when the incident angle of the simulated ray is determined, correspondingly obtaining the coordinate data of the second simulation model according to the position information of the laser tracker, and similarly, determining the coordinate data of the target model assembly based on the position and attitude information of the positioning piece.
Based on the preset vector, the position information of the laser tracker and the position and posture information of the positioning piece, the corresponding incident angle can be obtained through calculation, whether the simulation ray is an effective ray or not is judged based on the incident angle, the simulation laser beam is generated based on the effective ray, the invalid simulation ray is cancelled and displayed, the system overhead can be reduced, and the tracking accuracy is improved.
In any of the above technical solutions, a formula for determining the incident angle is:
Figure BDA0003751532390000071
where θ is the angle of incidence, N t Is a predetermined vector, P s For position information of laser trackers, P t The pose information of the positioning piece.
In the technical scheme, the incident angle of the simulated ray can be calculated through the formula. After the incident angle is obtained, if the incident angle is smaller than or equal to the incident angle threshold, the reflected laser representing the laser ray can be received by the laser tracker, and at this time, the corresponding simulated ray is determined to be an effective ray. If the incident angle is larger than the incident angle threshold value, the reflected laser representing the laser ray cannot be received by the laser tracker, and at the moment, the corresponding simulation ray is judged to be an invalid ray. The simulation laser beam is generated based on the effective ray, the invalid simulation ray is cancelled and displayed, the system overhead can be reduced, and the tracking precision can be improved.
In any of the above technical solutions, when the collision result is that there is a collision, the method further includes: and adjusting the preset track, and re-executing the step of detecting the collision result of the simulation laser beam and the first simulation model and/or the third simulation model until the collision result is no collision.
In the technical scheme, if the simulated laser beam collides with the first simulation model or the third simulation model, it is indicated that laser light emitted by the laser tracker to the positioning piece is shielded by the mechanical arm body or an environmental object in the motion process of the mechanical arm, so that the laser tracker loses tracking and positioning of the positioning piece, at this time, the preset track of the motion of the mechanical arm is changed by adjusting a working program of the robot workbench, and then, whether the simulated laser beam collides with the first simulation model or the third simulation model is judged again by the same simulation method, if so, the working program is continuously adjusted until the adjusted motion track does not cause the laser beam to be shielded.
According to the method and the device, the hardware architecture of the robot platform is not required to be adjusted or set up actually, the time cost consumed in the program test verification process is reduced, and the test and verification efficiency is improved.
The second aspect of the present invention provides a simulation apparatus for a robot system, the robot system including a robot arm and a laser tracker, the robot arm being provided with a positioning element, the laser tracker being configured to obtain position information of the positioning element, the simulation apparatus including:
the generation module is used for generating a first simulation model of the mechanical arm, a second simulation model of the laser tracker and a third simulation model of the environmental object, wherein a target model component is arranged on the first simulation model and is a simulation model of the positioning piece; the acquisition module is used for acquiring parameter information of the laser tracker; the simulation module is used for generating a simulation laser beam according to the parameter information, and the simulation laser beam is emitted to the target model assembly from the second simulation model; the control module is used for controlling the first simulation model to move according to a preset track; and the detection module is used for detecting the collision result of the simulation laser beam and the first simulation model and/or the third simulation model and determining the simulation result according to the collision result.
In the technical scheme, a robot system, namely a robot workstation, is provided with a mechanical arm for processing a workpiece in the robot workstation, a positioning part is arranged at the tail end of the mechanical arm, specifically, the positioning part can be a reflecting part, and a laser tracker of the robot workstation is used for measuring position information of the positioning part by emitting a laser beam to the reflecting part and according to a received reflected light beam, so that the pose of the mechanical arm is determined.
In the working process of the robot workstation, the compiled working program needs to be called to control the mechanical arm to move according to the movement track specified by the working program, so that the workpiece is processed. In the process, in order to ensure the accurate measurement of the laser tracker and further ensure the working precision of the robot, the laser tracker and the tracked target need to be ensured, namely, no obstacle blocking the transmission of the laser beam exists between the positioning parts, wherein the obstacle may be an environmental object or a mechanical arm of the robot.
Therefore, after the working program of the robot is written, the working program needs to be tested on the robot workstation to investigate whether the laser beam emitted by the laser tracker is blocked by an obstacle or not in the movement process of the robot, if so, the working program of the robot needs to be adjusted, and in the process, the hardware layout of the robot workstation needs to be adjusted repeatedly, so that the time cost is high.
The embodiment of the application provides a simulation method, which comprises the steps of establishing a three-dimensional model of a robot workstation to be tested in a simulation experiment platform, wherein the three-dimensional model comprises a laser tracker, a mechanical arm and a simulation model of an environmental object, and a target model assembly corresponding to a positioning piece is arranged on a first simulation model of the mechanical arm. The working process of the robot platform is simulated through the simulation models, and the laser tracker tracks and positions the positioning piece on the mechanical arm, so that whether the laser beam emitted by the laser tracker is shielded by the mechanical arm or an environmental object or not in the motion process of the mechanical arm is judged.
Because the simulation model can virtually set up various different test scenes by calling corresponding program functions, the hardware architecture of the robot platform does not need to be adjusted or set up actually, the time cost consumed in the test process can be obviously reduced, and the test and verification efficiency is improved.
Specifically, in the simulation process, first, a first simulation model, a second simulation model, and a third simulation model are generated, respectively. The first simulation model is a simulation model of a mechanical arm of the robot, the second simulation model is a simulation model of the laser tracker, and the third simulation model is a simulation model of an environmental object which possibly blocks a laser beam and exists in an environment.
After the model is generated, parameter information of laser tracker hardware set in an actual robot workstation, which indicates performance parameters, setting manner, and the like of the laser tracker, is acquired. After the parameter information is set, the simulated laser tracker emits a virtual simulated laser ray to the simulated positioning part, namely the target model assembly, and the starting point of the simulated laser ray is the simulated laser tracker, namely the second simulated model.
At this time, the first simulation model is controlled according to the programmed working program, and the movement is performed according to the preset track specified by the working program, so that the action of the mechanical arm when the workpiece is processed is simulated. In the motion process of the first simulation model, the simulation system continuously detects whether the laser light of the target model assembly shot by the second simulation model collides with the first simulation model, namely the mechanical arm body, or the third simulation model, namely the environmental object.
It can be understood that if the simulated laser beam collides with the first simulation model or the third simulation model, it indicates that, in the motion process of the mechanical arm, the laser light emitted by the laser tracker to the positioning element is shielded by the mechanical arm body or an environmental object, so that the laser tracker loses the tracking and positioning of the positioning element, and at this time, the working procedure of the robot worktable needs to be adjusted to change the motion path of the mechanical arm.
If the laser light does not collide with the first simulation model and the third simulation model, it can be shown that the laser light emitted by the laser tracker to the positioning piece can not be shielded by the mechanical arm body or an environmental object in the motion process of the mechanical arm, and the current test working procedure is reliable.
The simulation laser beam of the laser tracker based on simulation is tested with the simulated mechanical arm model and the environment object model according to the collision result, the working program for controlling the movement of the mechanical arm is tested, the whole process of the test process depends on a simulation algorithm, the hardware framework of the robot platform is not required to be adjusted or built actually, for example, the position of a camera is not required to be adjusted actually, so that the arrangement of an adaptive fixing plate and a mounting seat for a new camera position is omitted, the machining cost or the 3D printing cost is reduced, the hardware waste generated in the process of repeated debugging is avoided, the hardware cost of debugging is reduced, the time cost consumed in the process of program test verification is reduced, and the test and verification efficiency is improved.
A third aspect of the present invention provides a simulation apparatus, comprising: a memory for storing programs or instructions; the processor is configured to implement the simulation method provided in any one of the above technical solutions when executing the program or the instruction, and therefore, the simulation apparatus also includes all the beneficial effects of the simulation method provided in any one of the above technical solutions, and details are not described herein for avoiding repetition.
A fourth aspect of the present invention provides a readable storage medium, on which a program or an instruction is stored, where the program or the instruction is executed by a processor to implement the simulation method provided in any of the above technical solutions, and therefore, the readable storage medium also includes all beneficial effects of the simulation method provided in any of the above technical solutions, and in order to avoid repetition, details are not described herein again.
A fifth aspect of the present invention provides a simulation test platform, including the simulation apparatus provided in any one of the above technical solutions; and/or the readable storage medium provided in any of the above technical solutions, therefore, the simulation test platform also includes all the beneficial effects of the simulation apparatus provided in any of the above technical solutions and/or the readable storage medium provided in any of the above technical solutions, and in order to avoid repetition, details are not described here again.
A sixth aspect of the present invention provides a computer program product, which is stored in a storage medium, and when being executed by a processor, the computer program product implements the simulation method provided in any of the above technical solutions, so that the computer program product also includes all the beneficial effects of the simulation method provided in any of the above technical solutions, and in order to avoid repetition, details are not described herein again.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 shows one of the flow diagrams of a simulation method according to an embodiment of the invention;
FIG. 2 shows an interface diagram of a simulation method according to an embodiment of the invention;
FIG. 3 shows a schematic layout of a robotic platform according to an embodiment of the invention;
FIG. 4 shows a second flowchart of a simulation method according to an embodiment of the invention;
fig. 5 shows a block diagram of a simulation apparatus according to an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced otherwise than as specifically described herein and, therefore, the scope of the present invention is not limited by the specific embodiments disclosed below.
The simulation method, the simulation apparatus, the readable storage medium, and the simulation test platform according to some embodiments of the present invention are described below with reference to fig. 1 to 5.
Example one
In some embodiments of the present invention, a simulation method is provided for a robot system, where the robot system includes a mechanical arm and a laser tracker, the mechanical arm is provided with a positioning element, and the laser tracker is used to obtain position information of the positioning element, and fig. 1 shows one of flowcharts of a simulation method according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
102, generating a first simulation model of the mechanical arm, a second simulation model of the laser tracker and a third simulation model of the environmental object, wherein a target model assembly is arranged on the first simulation model, and the target model assembly is a simulation model of the positioning part;
104, acquiring parameter information of the laser tracker;
106, generating a simulation laser beam according to the parameter information, wherein the simulation laser beam is emitted to the target model assembly from the second simulation model;
step 108, controlling the first simulation model to move according to a preset track;
and 110, detecting a collision result of the simulation laser beam and the first simulation model and/or the third simulation model, and determining a simulation result according to the collision result.
In the embodiment of the invention, a robot system, namely a robot workstation, is provided with a mechanical arm for processing a workpiece in the robot workstation, a positioning part is arranged on the mechanical arm, specifically the tail end of the mechanical arm, the positioning part can be a reflecting part, and a laser tracker of the robot workstation is used for measuring the position information of the positioning part by emitting a laser beam to the reflecting part and according to a received reflected light beam, so as to determine the pose of the mechanical arm.
In the working process of the robot workstation, the compiled working program needs to be called to control the mechanical arm to move according to the movement track specified by the working program, so that the workpiece is processed. In the process, in order to ensure the accurate measurement of the laser tracker and further ensure the working precision of the robot, the laser tracker and the tracked target need to be ensured, namely, no obstacle blocking the transmission of the laser beam exists between the positioning parts, wherein the obstacle may be an environmental object or a mechanical arm of the robot.
Therefore, after the working program of the robot is written, the working program needs to be tested on the robot workstation to investigate whether the laser beam emitted by the laser tracker is blocked by an obstacle or not in the movement process of the robot, if so, the working program of the robot needs to be adjusted, and in the process, the hardware layout of the robot workstation needs to be adjusted repeatedly, so that the time cost is high.
The embodiment of the application provides a simulation method, fig. 2 shows an interface diagram of the simulation method according to the embodiment of the invention, fig. 3 shows a layout schematic diagram of a robot platform according to the embodiment of the invention, and as shown in fig. 2 and fig. 3, a three-dimensional model of a robot workstation to be tested is established in a simulation experiment platform and comprises a simulation model of a laser tracker, a mechanical arm and an environmental object, wherein a target model component corresponding to a positioning part is arranged on a first simulation model of the mechanical arm. The working process of the robot platform is simulated through the simulation models, and the laser tracker tracks and positions the positioning piece on the mechanical arm, so that whether the laser beam emitted by the laser tracker is shielded by the mechanical arm or an environmental object or not in the movement process of the mechanical arm is judged.
Because the simulation model can virtually set up various different test scenes by calling corresponding program functions, the hardware architecture of the robot platform does not need to be adjusted or set up actually, the time cost consumed in the test process can be obviously reduced, and the test and verification efficiency is improved.
Specifically, in the simulation process, first, a first simulation model, a second simulation model, and a third simulation model are generated, respectively. The first simulation model is a simulation model of a mechanical arm of the robot, the second simulation model is a simulation model of the laser tracker, and the third simulation model is a simulation model of an environmental object which possibly blocks a laser beam and exists in the environment.
After the model is generated, parameter information of laser tracker hardware set in an actual robot workstation, which indicates performance parameters, a setting manner, and the like of the laser tracker, is acquired. After the parameter information is set, the simulated laser tracker emits virtual simulated laser light to the simulated positioning piece, namely the target model assembly, and the starting point of the simulated laser light is the simulated laser tracker, namely the second simulation model.
At this time, the first simulation model is controlled according to the programmed working program, and the movement is performed according to the preset track specified by the working program, so that the action of the mechanical arm when the workpiece is processed is simulated. In the motion process of the first simulation model, the simulation system continuously detects whether the laser light of the target model assembly shot by the second simulation model collides with the first simulation model, namely the mechanical arm body, or the third simulation model, namely the environmental object.
It can be understood that if the simulation laser beam collides with the first simulation model or the third simulation model, it indicates that in the motion process of the mechanical arm, the laser light emitted by the laser tracker to the positioning piece can be shielded by the mechanical arm body or an environmental object, so that the laser tracker loses the tracking and positioning of the positioning piece, and at the moment, the working procedure of the robot worktable needs to be adjusted, and the motion path of the mechanical arm is changed.
If the laser light does not collide with the first simulation model and the third simulation model, it can be shown that the laser light emitted by the laser tracker to the positioning piece can not be shielded by the mechanical arm body or an environmental object in the motion process of the mechanical arm, and the current test working procedure is reliable.
The simulation laser beam of the laser tracker based on simulation is tested with the simulated mechanical arm model and the environment object model according to the collision result, the working program for controlling the movement of the mechanical arm is tested, the whole process of the test process depends on a simulation algorithm, the hardware framework of the robot platform is not required to be adjusted or built actually, for example, the position of a camera is not required to be adjusted actually, so that the arrangement of an adaptive fixing plate and a mounting seat for a new camera position is omitted, the machining cost or the 3D printing cost is reduced, the hardware waste generated in the process of repeated debugging is avoided, the hardware cost of debugging is reduced, the time cost consumed in the process of program test verification is reduced, and the test and verification efficiency is improved.
On the basis of any of the above embodiments, the parameter information includes: the positioning device comprises position information of the laser tracker, position and attitude information of the positioning piece, an incident angle threshold and/or a distance range between the laser tracker and the positioning piece.
In the embodiment of the present invention, the parameter information of the laser tracker specifically includes position information, and the position information specifically includes a setting position of the laser tracker in space, and the position information may be defined as a 4 × 1 matrix SourcePosition.
The parameter information further includes a tracking target of the laser tracker, that is, pose information of the positioning element, where the pose information includes a spatial position and a spatial attitude of the positioning element, and may be specifically defined as 4 × 4 matrix data, targetMatrix.
The parameter information further includes an incident angle, specifically, the incident angle threshold refers to an incident angle of the laser that the positioning element can receive, and after the incident angle of the laser ray exceeds the threshold, the reflected laser may not be received by the laser tracker, that is, the reflected laser is formed as an invalid laser, and the incident angle threshold may be specifically defined as real number data acceptable angle.
The parameter information further comprises a distance range between the laser tracker and the positioning element, specifically, the distance range comprises a minimum distance between the laser tracker and a tracking target thereof, i.e. the positioning element, and further comprises a maximum distance between the laser tracker and a tracking target thereof, i.e. the positioning element. Wherein, the minimum distance can be defined as real data ClipNear, and the maximum distance can be defined as real data ClipFar.
After parameter information of the laser tracker is determined, a working program for controlling the motion of the mechanical arm is tested by judging whether the simulated laser beam collides with the simulated first simulation model and the simulated third simulation model, the whole testing process depends on a simulation algorithm, the actual adjustment or construction of a hardware framework of the robot platform is not needed, the time cost consumed in the process of program testing and verification is reduced, and the testing and verifying efficiency is improved.
On the basis of any of the above embodiments, generating a simulated laser beam according to the parameter information includes: determining a cylindrical model according to the position information of the laser tracker, the pose information of the positioning piece and a preset radius; and determining the simulated laser beam according to the cylindrical model.
In the embodiment of the invention, in the actual working process, the laser tracker can continuously emit laser beams to the positioning piece, the laser beams comprise a plurality of laser rays, the laser beams can be reflected along the reflection light path after being emitted to the surface of the positioning piece, and the laser tracker can realize the tracking and positioning of the spatial position of the positioning piece according to the reflected rays.
In the simulation system, the laser beam is simulated by a cylindrical model. In particular, the second simulation model and the positioning corresponding to the laser trackerSimulating a cylindrical model between the target model components corresponding to the cylindrical model, wherein the initial position of the cylindrical model is the light source position P of the second simulation model t The ending position of the cylindrical model is the position P of the target model building name s The radius of the cylinder model is a preset value r, and the length of the cylinder model is | P t -P s |。
The working program for controlling the motion of the mechanical arm is tested by judging whether the cylindrical model collides with the first simulation model or the third simulation model, the whole testing process depends on a simulation algorithm, the actual adjustment or construction of a hardware framework of the robot platform is not needed, the time cost consumed in the program testing and verifying process is reduced, and the testing and verifying efficiency is improved.
On the basis of any one of the above embodiments, detecting a collision result of the simulated laser beam with the first simulation model and/or the third simulation model includes: acquiring the number of intersection points of the cylindrical model and the first simulation model and/or the third simulation model; and determining a collision result according to the number of the intersection points.
In the embodiment of the present invention, the cylinder model is a model of the simulated laser beam, and the position and the like of the simulated laser beam in the simulation space are expressed by the cylinder model, so that the simulated laser beam is visualized. Wherein, whether the intersection points exist between the Yuan-Yuan model and the first simulation model and the third simulation model can reflect whether the actual laser beam is emitted to the mechanical arm or the environmental object, therefore, based on the number of the intersection points between the cylindrical model and the first simulation model and the third simulation model, whether the laser beam of can accurately reflecting directive setting element can be sheltered from by the barrier, need not the actual hardware framework to the robot platform and adjusts or builds, reduced the time cost that the procedure test verified in-process consumed, improved the efficiency of test and verification.
On the basis of any of the above embodiments, the collision result is determined according to the number of intersections: determining that the collision result is the collision under the condition that the number of the intersection points is not zero; and in the case that the number of the intersection points is zero, determining that the collision result is no collision.
In the embodiment of the invention, the cylindrical model is a model for simulating the laser beam, and if intersection points exist between the cylindrical model and the first simulation model or the third simulation model, namely the number of the intersection points is not zero, the method represents that at least part of the laser beam is shielded by the mechanical arm or an environmental object in the actual working process, so that at least part of the laser beam cannot reach the positioning piece, and the collision result is specifically determined to be collision.
And if the cylindrical model and the first simulation model or the third simulation model do not have intersection points, namely the number of the intersection points is zero, the laser beam cannot be shielded by the mechanical arm or an environmental object in the actual working process, all the laser beams can reach the positioning piece, and the collision result is judged to be no collision.
According to the embodiment of the application, whether the actual laser beam can be shielded by the barrier or not is judged based on the number of intersection points of the cylindrical model, the first simulation model and the third simulation model, the hardware framework of the robot platform does not need to be adjusted or built actually, time cost consumed in the program test verification process is reduced, and test and verification efficiency is improved.
On the basis of any of the above embodiments, the simulating laser beam includes a plurality of simulating rays, and determining the simulating laser beam includes: determining the incident angle of the simulation ray; determining the simulation ray as an effective ray under the condition that the incident angle is less than or equal to the incident angle threshold; and determining the simulation ray as an invalid ray under the condition that the incident angle is larger than the incident angle threshold value.
In the embodiment of the invention, during the actual working process of the robot workstation, the laser beam emitted by the laser tracker to the positioning element is actually formed by a plurality of laser rays, so that in the simulation system, the simulation laser beam also comprises a plurality of simulation rays, and the simulation rays correspond to the actual laser rays.
The laser tracker operates on the principle of emitting a laser beam to an object to be tracked, and determining the position of the object to be tracked based on the reflected laser beam. The incident angle of the laser beam specifically refers to the incident angle of the laser received by the positioning element, and when the incident angle exceeds a certain value, specifically exceeds an incident angle threshold, the reflected laser may not be received by the laser tracker, that is, the reflected laser is formed as an invalid laser.
Therefore, if the incident angle is less than or equal to the incident angle threshold, the reflected laser light representing the laser ray can be received by the laser tracker, at which time the corresponding simulated ray is determined to be a valid ray. If the incident angle is larger than the incident angle threshold value, the reflected laser representing the laser ray cannot be received by the laser tracker, and at the moment, the corresponding simulation ray is judged to be an invalid ray.
By restricting the incident angle, invalid rays can be reduced, and the tracking precision is improved.
On the basis of any of the above embodiments, after determining the incident angle of the simulated ray, the method further includes: and canceling the display of the invalid ray, and generating a simulation laser beam according to the valid ray.
In the embodiment of the invention, when the incident angle is larger than the incident angle threshold, the reflected laser representing the laser ray cannot be received by the laser tracker, the simulation ray is determined to be an invalid ray, and the invalid simulation ray is cancelled and displayed, so that the system overhead can be reduced. If the incident angle is smaller than or equal to the incident angle threshold, the corresponding simulation ray is judged to be an effective ray, and the simulation laser beam is generated based on the effective ray, so that invalid rays can be reduced, and the tracking accuracy is improved.
On the basis of any one of the above embodiments, determining the incident angle of the simulated ray includes: and determining the incident angle according to the position information of the laser tracker, the pose information of the positioning piece and the preset vector.
In the embodiment of the present invention, the preset vector may be specifically a normal vector of a side surface of the positioning element facing the laser tracker. And when the incident angle of the simulated ray is determined, correspondingly obtaining the coordinate data of the second simulation model according to the position information of the laser tracker, and similarly, determining the coordinate data of the target model assembly based on the position and attitude information of the positioning piece.
Based on the preset vector, the position information of the laser tracker and the position and posture information of the positioning piece, the corresponding incident angle can be obtained through calculation, whether the simulation ray is an effective ray or not is judged based on the incident angle, the simulation laser beam is generated based on the effective ray, the invalid simulation ray is cancelled and displayed, the system overhead can be reduced, and the tracking accuracy is improved.
On the basis of any of the above embodiments, the formula for determining the angle of incidence is:
Figure BDA0003751532390000171
where θ is the angle of incidence, N t Is a predetermined vector, P s For position information of laser trackers, P t The pose information of the positioning piece.
In the embodiment of the invention, the incident angle of the simulated ray can be calculated through the formula. After the incident angle is obtained, if the incident angle is smaller than or equal to the incident angle threshold, the reflected laser representing the laser ray can be received by the laser tracker, and at this time, the corresponding simulated ray is determined to be an effective ray. If the incident angle is larger than the incident angle threshold value, the reflected laser representing the laser ray cannot be received by the laser tracker, and at the moment, the corresponding simulation ray is judged to be an invalid ray. The simulation laser beam is generated based on the effective ray, the invalid simulation ray is cancelled and displayed, the system overhead can be reduced, and the tracking precision can be improved.
On the basis of any embodiment, in the case that there is a collision as a result of the collision, the method further includes: and adjusting the preset track, and re-executing the step of detecting the collision result of the simulation laser beam and the first simulation model and/or the third simulation model until the collision result is no collision.
In the embodiment of the invention, if the simulated laser beam collides with the first simulation model or the third simulation model, it is indicated that the laser light emitted by the laser tracker to the positioning piece is shielded by the mechanical arm body or an environmental object in the motion process of the mechanical arm, so that the laser tracker loses the tracking and positioning of the positioning piece, at this time, the preset track of the motion of the mechanical arm is changed by adjusting the working program of the robot workbench, and then, whether the simulated laser beam collides with the first simulation model or the third simulation model is judged again by the same simulation method, and if so, the working program is continuously adjusted until the adjusted motion track does not cause the laser beam to be shielded.
According to the method and the device, the hardware architecture of the robot platform does not need to be adjusted or built actually, the time cost consumed in the program test verification process is reduced, and the test and verification efficiency is improved.
Example two
In some embodiments of the invention, a simulation method is provided, in particular, a robot equipment model, a laser tracker equipment model, a vision system support model and the like are loaded in simulation software to create a robot vision application workstation layout. A software algorithm is started to simulate the behaviors of the laser tracker and the laser beam equipment, barrier-free transmission of the laser beam is rapidly obtained in the programming process, and information feedback such as incident angle requirements is met. Meanwhile, a measuring motion track matched with the measured characteristic can be automatically generated according to the requirement and the type of the measured characteristic under the assistance of an algorithm. A programmer can efficiently perform programming work to generate a robot program, and the robot can perform measurement work with high quality.
Fig. 4 shows a second flowchart of a simulation method according to an embodiment of the invention, and as shown in fig. 4, the method includes:
step 402, creating a robot and laser tracker application workstation in simulation software;
step 404, creating a light source instance and a target instance of the laser tracker according to an application scene, configuring algorithm parameters, and simulating sensor behaviors;
step 406, controlling the robot to move according to the application scene requirement so as to trigger the sensor and obtain the feedback of the sensor;
and step 408, adjusting the motion track of the robot according to the feedback result of the sensor.
Typical procedures and specific computational details for the behavior simulation of a laser tracker are described below:
1. simulation of a laser tracker:
the laser tracker simulation is to dynamically calculate the pose and the visualization state of a laser beam through the virtual space position of a laser tracker light source and the position and the posture of a laser beam target in the space. The virtual laser tracker includes, but is not limited to, the following parameters:
name, string, the Name that defines the virtual laser tracker.
SourcePosition, a 4 x 1 vector, defines the position of a virtual laser tracker light source in space.
TargetMatrix, a 4 x 4 matrix, defines the position and attitude of the virtual laser tracker target in space, and there may be multiple sets of target matrices.
Acceparataneangle, real number, defines the angle of incidence of the laser light that can be accepted by the virtual laser tracker target.
ClipNear, real, defines the minimum distance between an identifiable target in a virtual laser tracker and its location.
ClipFar, real number, defines the maximum distance that an identifiable target in a virtual laser tracker can be from its location.
2. Laser tracker data feedback:
the laser beam delivers feedback unobstructed. Creating a virtual laser tracker light source example for a laser tracker equipment model in a robot vision application workstation layout, wherein the light source position is P s The position of the target of the laser tracker in space is P t . Feedback can be divided into the following two categories:
1. the laser beam is fed back without obstruction, and a 3D laser beam model is created between the light source position and the target position, with the radius as r and the starting position and the ending position as P respectively t And P s Length of | P t -P s The cylindrical model of | represents that by configuring a collision detection relationship between the laser beam model and the obstacle model, a collision detection result between the models is obtained when the laser tracker target moves, if no collision occurs, the laser beam can be transmitted between the light source and the target without obstacle, and if the collision occurs, the laser beam is blocked by the obstacle and cannot be transmitted between the light source and the target.
2. The light source incidence angle requires feedback. Laser tracker device for robot vision application workstation layoutCreating a virtual laser tracker light source example by the aid of the model, wherein the position of the light source is P s The position of the target of the laser tracker in space is P t Normal vector is N t The incident angle of the laser light from the light source to the target is calculated by the following formula:
Figure BDA0003751532390000191
where θ is the angle of incidence, N t Is a predetermined vector, P s For position information of the laser tracker, P t The pose information of the positioning piece.
If theta is less than or equal to AcceptanceAngle, the incident laser beam is displayed as effective incidence, otherwise, the incident laser beam is hidden as ineffective incidence.
EXAMPLE III
In some embodiments of the present invention, a simulation apparatus is provided, and is used for a robot system, where the robot system includes a mechanical arm and a laser tracker, the mechanical arm is provided with a positioning element, and the laser tracker is used to obtain position information of the positioning element, and fig. 5 shows a structural block diagram of the simulation apparatus according to an embodiment of the present invention, and as shown in fig. 5, the simulation apparatus 500 includes:
a generating module 502, configured to generate a first simulation model of the mechanical arm, a second simulation model of the laser tracker, and a third simulation model of the environmental object, where a target model component is arranged on the first simulation model, and the target model component is a simulation model of the positioning element;
an obtaining module 504, configured to obtain parameter information of the laser tracker;
the simulation module 506 is used for generating a simulation laser beam according to the parameter information, and the simulation laser beam is emitted to the target model assembly from the second simulation model;
the control module 508 is configured to control the first simulation model to move according to a preset trajectory;
and the detection module 510 is configured to detect a collision result of the simulated laser beam with the first simulation model and/or the third simulation model, and determine a simulation result according to the collision result.
In the embodiment of the present invention, a robot system, that is, a robot workstation, is provided with a robot arm for processing a workpiece in the robot workstation, a positioning element is provided at the end of the robot arm, specifically, the positioning element may be a light reflecting element, and a laser tracker of the robot workstation is configured to measure position information of the positioning element by emitting a laser beam to the light reflecting element and according to a received reflected light beam, so as to determine a pose of the robot arm.
In the working process of the robot workstation, the compiled working program needs to be called to control the mechanical arm to move according to the movement track specified by the working program, so that the workpiece is processed. In the process, in order to ensure the accurate measurement of the laser tracker and thus ensure the working precision of the robot, it is necessary to ensure that the laser tracker and the tracked target do not have an obstacle blocking the transmission of the laser beam between the positioning parts, wherein the obstacle may be an environmental object or a mechanical arm of the robot itself.
Therefore, after the working program of the robot is written, the working program needs to be tested on the robot workstation to investigate whether the laser beam emitted by the laser tracker is blocked by an obstacle or not in the movement process of the robot, if so, the working program of the robot needs to be adjusted, and in the process, the hardware setting of the robot workstation needs to be adjusted repeatedly, so that the time cost is high.
The embodiment of the application provides a simulation method, wherein a three-dimensional model of a robot workstation to be tested is established in a simulation experiment platform, the three-dimensional model comprises a laser tracker, a mechanical arm and a simulation model of an environmental object, and a target model assembly corresponding to a positioning piece is arranged on a first simulation model of the mechanical arm. The working process of the robot platform is simulated through the simulation models, and the laser tracker tracks and positions the positioning piece on the mechanical arm, so that whether the laser beam emitted by the laser tracker is shielded by the mechanical arm or an environmental object or not in the movement process of the mechanical arm is judged.
Because the simulation model can virtually set up various different test scenes by calling corresponding program functions, the hardware architecture of the robot platform does not need to be adjusted or set up actually, the time cost consumed in the test process can be obviously reduced, and the test and verification efficiency is improved.
Specifically, in the simulation process, first, a first simulation model, a second simulation model, and a third simulation model are generated, respectively. The first simulation model is a simulation model of a mechanical arm of the robot, the second simulation model is a simulation model of the laser tracker, and the third simulation model is a simulation model of an environmental object which possibly blocks a laser beam and exists in an environment.
After the model is generated, parameter information of laser tracker hardware set in an actual robot workstation, which indicates performance parameters, setting manner, and the like of the laser tracker, is acquired. After the parameter information is set, the simulated laser tracker emits virtual simulated laser light to the simulated positioning piece, namely the target model assembly, and the starting point of the simulated laser light is the simulated laser tracker, namely the second simulation model.
At this time, the first simulation model is controlled according to the programmed working program, and the movement is performed according to the preset track specified by the working program, so that the action of the mechanical arm when the workpiece is processed is simulated. In the motion process of the first simulation model, the simulation system continuously detects whether the laser light of the target model assembly shot by the second simulation model collides with the first simulation model, namely the mechanical arm body, or the third simulation model, namely the environmental object.
It can be understood that if the simulation laser beam collides with the first simulation model or the third simulation model, it indicates that in the motion process of the mechanical arm, the laser light emitted by the laser tracker to the positioning piece can be shielded by the mechanical arm body or an environmental object, so that the laser tracker loses the tracking and positioning of the positioning piece, and at the moment, the working procedure of the robot worktable needs to be adjusted, and the motion path of the mechanical arm is changed.
If the laser light does not collide with the first simulation model and the third simulation model, it can be shown that the laser light emitted to the positioning piece by the laser tracker cannot be shielded by the mechanical arm body or an environmental object in the motion process of the mechanical arm, and the current test working procedure is reliable.
The simulation laser beam of the laser tracker based on simulation is tested with the simulated mechanical arm model and the environment object model according to the collision result, the working program for controlling the movement of the mechanical arm is tested, the whole process of the test process depends on a simulation algorithm, the hardware framework of the robot platform is not required to be adjusted or built actually, for example, the position of a camera is not required to be adjusted actually, so that the arrangement of an adaptive fixing plate and a mounting seat for a new camera position is omitted, the machining cost or the 3D printing cost is reduced, the hardware waste generated in the process of repeated debugging is avoided, the hardware cost of debugging is reduced, the time cost consumed in the process of program test verification is reduced, and the test and verification efficiency is improved.
On the basis of any of the above embodiments, the parameter information includes: the positioning device comprises position information of the laser tracker, position and attitude information of the positioning piece, an incident angle threshold and/or a distance range between the laser tracker and the positioning piece.
In the embodiment of the present invention, the parameter information of the laser tracker specifically includes position information, and the position information specifically includes a setting position of the laser tracker in space, and the position information may be defined as a 4 × 1 matrix SourcePosition.
The parameter information further includes a tracking target of the laser tracker, that is, pose information of the positioning element, where the pose information includes a spatial position and a spatial attitude of the positioning element, and may be specifically defined as 4 × 4 matrix data, targetMatrix.
The parameter information further includes an incident angle, specifically, the incident angle threshold refers to an incident angle of the laser that the positioning element can receive, and after the incident angle of the laser ray exceeds the threshold, the reflected laser may not be received by the laser tracker, that is, the reflected laser is formed as an invalid laser, and the incident angle threshold may be specifically defined as real number data acceptable angle.
The parameter information further comprises a distance range between the laser tracker and the positioning element, specifically, the distance range comprises a minimum distance between the laser tracker and a tracking target thereof, i.e. the positioning element, and further comprises a maximum distance between the laser tracker and a tracking target thereof, i.e. the positioning element. Wherein, the minimum distance can be defined as real data ClipNear, and the maximum distance can be defined as real data ClipFar.
After parameter information of the laser tracker is determined, a working program for controlling the motion of the mechanical arm is tested by judging whether the simulated laser beam collides with the simulated first simulation model and the simulated third simulation model, the whole testing process depends on a simulation algorithm, the actual adjustment or construction of a hardware framework of the robot platform is not needed, the time cost consumed in the process of program testing and verification is reduced, and the testing and verifying efficiency is improved.
On the basis of any of the above embodiments, the simulation apparatus further includes: the determining module is used for determining a cylindrical model according to the position information of the laser tracker, the pose information of the positioning piece and the preset radius; and determining the simulated laser beam according to the cylindrical model.
In the embodiment of the invention, in the actual working process, the laser tracker can continuously emit the laser beam to the positioning piece, the laser beam comprises a plurality of laser rays, the laser beam can be reflected along the reflection light path after being emitted to the surface of the positioning piece, and the laser tracker can realize the tracking and positioning of the spatial position of the positioning piece according to the reflected light rays.
In the simulation system, the laser beam is simulated by a cylindrical model. Specifically, a cylindrical model is simulated between a second simulation model corresponding to the laser tracker and a target model component corresponding to the positioning piece, and the initial position of the cylindrical model is the light source position P of the second simulation model t The ending position of the cylindrical model is the position P of the target model building name s The radius of the cylinder model is a preset value r, and the length of the cylinder model is | P t -P s |。
The working program for controlling the motion of the mechanical arm is tested by judging whether the cylindrical model collides with the first simulation model or the third simulation model, the whole testing process depends on a simulation algorithm, the actual adjustment or construction of a hardware framework of the robot platform is not needed, the time cost consumed in the program testing and verifying process is reduced, and the testing and verifying efficiency is improved.
On the basis of any one of the above embodiments, the obtaining module is further configured to obtain the number of intersection points of the cylindrical model and the first simulation model and/or the third simulation model; the determining module is further configured to determine a collision result according to the number of the intersections.
In the embodiment of the present invention, the cylinder model is a model of the simulated laser beam, and the position and the like of the simulated laser beam in the simulation space are expressed by the cylinder model, so that the simulated laser beam is visualized. Wherein, whether the intersection points exist between the Yuan-Yuan model and the first simulation model and the third simulation model can reflect whether the actual laser beam is emitted to the mechanical arm or the environmental object, therefore, based on the number of the intersection points between the cylindrical model and the first simulation model and the third simulation model, whether the laser beam of directive locating piece can be sheltered from by the barrier can be accurately reflected, need not the actual hardware framework to robot platform and adjust or build, the time cost of having reduced procedure test and verifying in-process consumption has improved the efficiency of test and verification.
On the basis of any of the above embodiments, the determining module is further configured to determine that the collision result is a collision when the number of the intersection points is not zero; and in the case that the number of the intersection points is zero, determining that the collision result is no collision.
In the embodiment of the invention, the cylindrical model is a model for simulating the laser beam, and if intersection points exist between the cylindrical model and the first simulation model or the third simulation model, namely the number of the intersection points is not zero, the method represents that at least part of the laser beam is shielded by the mechanical arm or an environmental object in the actual working process, so that at least part of the laser beam cannot reach the positioning piece, and the collision result is specifically determined to be collision.
And if the cylindrical model and the first simulation model or the third simulation model do not have intersection points, namely the number of the intersection points is zero, the laser beam cannot be shielded by the mechanical arm or an environmental object in the actual working process, all the laser beams can reach the positioning piece, and the collision result is judged to be no collision.
The embodiment of the application judges whether the actual laser beam can be shielded by the barrier or not based on the number of the intersection points of the cylindrical model, the first simulation model and the third simulation model, and the hardware framework of the robot platform is not required to be adjusted or set up actually, so that the time cost consumed in the process of program test verification is reduced, and the efficiency of the test and the verification is improved.
On the basis of any of the above embodiments, the determining module is further configured to: determining the incident angle of the simulation ray; determining the simulation ray as an effective ray under the condition that the incident angle is less than or equal to the incident angle threshold; and determining the simulation ray as an invalid ray under the condition that the incident angle is larger than the incident angle threshold value.
In the embodiment of the invention, in the actual working process of the robot workstation, the laser beam emitted by the laser tracker to the positioning part actually consists of a plurality of laser rays, so that in the simulation system, the simulation laser beam also comprises a plurality of simulation rays, and the simulation rays correspond to the actual laser rays.
The laser tracker operates on the principle of emitting a laser beam to an object to be tracked, and determining the position of the object to be tracked based on the reflected laser beam. The incident angle of the laser beam specifically refers to the incident angle of the laser received by the positioning element, and when the incident angle exceeds a certain value, specifically exceeds an incident angle threshold, the reflected laser may not be received by the laser tracker, that is, the reflected laser is formed as an invalid laser.
Therefore, if the incident angle is less than or equal to the incident angle threshold, the reflected laser light representing the laser ray can be received by the laser tracker, at which time the corresponding simulated ray is determined to be a valid ray. If the incident angle is larger than the incident angle threshold value, the reflected laser representing the laser ray cannot be received by the laser tracker, and the corresponding simulation ray is judged to be an invalid ray.
By restricting the incident angle, invalid rays can be reduced, and the tracking precision is improved.
On the basis of any of the above embodiments, the simulation module is further configured to cancel displaying the invalid ray, and generate the simulated laser beam according to the valid ray.
In the embodiment of the invention, when the incident angle is larger than the incident angle threshold, the reflected laser representing the laser ray cannot be received by the laser tracker, the simulation ray is determined to be an invalid ray, and the invalid simulation ray is cancelled and displayed, so that the system overhead can be reduced. If the incident angle is smaller than or equal to the incident angle threshold, the corresponding simulation ray is judged to be an effective ray, and the simulation laser beam is generated based on the effective ray, so that invalid rays can be reduced, and the tracking accuracy is improved.
On the basis of any one of the above embodiments, the determining module is further configured to determine the incident angle according to the position information of the laser tracker, the pose information of the positioning element, and the preset vector.
In the embodiment of the present invention, the preset vector may be specifically a normal vector of a side surface of the positioning element facing the laser tracker. And when the incident angle of the simulated ray is determined, correspondingly obtaining the coordinate data of the second simulation model according to the position information of the laser tracker, and similarly, determining the coordinate data of the target model assembly based on the position and attitude information of the positioning piece.
Based on the preset vector, the position information of the laser tracker and the position and posture information of the positioning piece, the corresponding incident angle can be obtained through calculation, whether the simulation ray is an effective ray or not is judged based on the incident angle, the simulation laser beam is generated based on the effective ray, the invalid simulation ray is cancelled and displayed, the system overhead can be reduced, and the tracking accuracy is improved.
On the basis of any of the above embodiments, the formula for determining the angle of incidence is:
Figure BDA0003751532390000251
where θ is the angle of incidence, N t Is a predetermined vector, P s For position information of laser trackers, P t The pose information of the positioning piece.
In the embodiment of the invention, the incident angle of the simulated ray can be calculated through the formula. After the incident angle is obtained, if the incident angle is smaller than or equal to the incident angle threshold, the reflected laser representing the laser ray can be received by the laser tracker, and at this time, the corresponding simulated ray is determined to be an effective ray. If the incident angle is larger than the incident angle threshold value, the reflected laser representing the laser ray cannot be received by the laser tracker, and at the moment, the corresponding simulation ray is judged to be an invalid ray. The simulation laser beam is generated based on the effective rays, the invalid simulation rays are cancelled and displayed, the system overhead can be reduced, and the tracking precision is improved.
On the basis of any of the above embodiments, the simulation apparatus further includes: and the adjusting module is used for adjusting the preset track and re-executing the step of detecting the collision result of the simulation laser beam and the first simulation model and/or the third simulation model until the collision result is no collision.
In the embodiment of the invention, if the simulated laser beam collides with the first simulation model or the third simulation model, it indicates that the laser light emitted by the laser tracker to the positioning element is shielded by the mechanical arm body or an environmental object in the motion process of the mechanical arm, so that the laser tracker loses the tracking and positioning of the positioning element, at this time, the preset track of the motion of the mechanical arm is changed by adjusting the working program of the robot workbench, and then, whether the simulated laser beam collides with the first simulation model or the third simulation model is judged again by the same simulation method, and if so, the working program is continuously adjusted until the adjusted motion track does not cause the laser beam to be shielded.
According to the method and the device, the hardware architecture of the robot platform is not required to be adjusted or set up actually, the time cost consumed in the program test verification process is reduced, and the test and verification efficiency is improved.
Example four
In some embodiments of the invention, there is provided a simulation apparatus comprising: a memory for storing programs or instructions; the processor is configured to implement the simulation method provided in any of the above embodiments when executing the program or the instruction, and therefore, the simulation apparatus also includes all the advantages of the simulation method provided in any of the above embodiments, and details are not described herein for avoiding redundancy.
EXAMPLE five
In some embodiments of the present invention, a readable storage medium is provided, on which a program or an instruction is stored, and the program or the instruction, when executed by a processor, implements the simulation method provided in any of the above embodiments, so that the readable storage medium also includes all the beneficial effects of the simulation method provided in any of the above embodiments, and in order to avoid repetition, the description is omitted here.
Example six
In some embodiments of the present invention, there is provided a simulation test platform comprising a simulation apparatus as provided in any of the above embodiments; and/or the readable storage medium provided in any of the above embodiments, therefore, the simulation test platform also includes all the advantages of the simulation apparatus provided in any of the above embodiments and/or the readable storage medium provided in any of the above embodiments, and in order to avoid repetition, details are not described here again.
EXAMPLE seven
In some embodiments of the present invention, a computer program product is provided, which is stored in a storage medium, and when being executed by a processor, the computer program product implements the simulation method provided in any of the above embodiments, so that the computer program product also includes all the beneficial effects of the simulation method provided in any of the above embodiments, and therefore, in order to avoid repetition, details are not described herein again.
In the description of the present invention, the terms "plurality" or "a plurality" refer to two or more, and unless otherwise specifically defined, the terms "upper", "lower", and the like indicate orientations or positional relationships based on the orientations or positional relationships illustrated in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention; the terms "connected," "mounted," "secured," and the like are to be construed broadly and include, for example, fixed connections, removable connections, or integral connections; may be directly connected or indirectly connected through an intermediate. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the description of the present invention, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In the present invention, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A simulation method is used for a robot system, and is characterized in that the robot system comprises a mechanical arm and a laser tracker, a positioning piece is arranged on the mechanical arm, and the laser tracker is used for measuring the position information of the positioning piece, and the method comprises the following steps:
generating a first simulation model of the mechanical arm, a second simulation model of the laser tracker and a third simulation model of the environmental object, wherein a target model component is arranged on the first simulation model, and the target model component is a simulation model of the positioning piece;
acquiring parameter information of the laser tracker;
generating a simulated laser beam according to the parameter information, wherein the simulated laser beam is emitted to the target model component from the second simulation model;
controlling the first simulation model to move according to a preset track;
and detecting a collision result of the simulation laser beam and the first simulation model and/or the third simulation model, and determining a simulation result according to the collision result.
2. The simulation method according to claim 1, wherein the parameter information comprises:
the positioning device comprises a laser tracker, a positioning piece and a positioning piece, wherein the laser tracker comprises position information of the laser tracker, pose information of the positioning piece, an incident angle threshold and/or a distance range between the laser tracker and the positioning piece.
3. The simulation method according to claim 2, wherein said generating a simulated laser beam according to the parameter information comprises:
determining a cylindrical model according to the position information of the laser tracker, the pose information of the positioning piece and a preset radius;
and determining the simulated laser beam according to the cylinder model.
4. The simulation method according to claim 3, wherein the detecting the collision result of the simulated laser beam with the first simulation model and/or the third simulation model comprises:
acquiring the number of intersection points of the cylindrical model and the first simulation model and/or the third simulation model;
and determining the collision result according to the number of the intersection points.
5. The simulation method of claim 4, wherein the determining the collision result according to the number of intersections:
determining that the collision result is a collision under the condition that the number of the intersection points is not zero;
and under the condition that the number of the intersection points is zero, determining that the collision result is no collision.
6. The simulation method of claim 3, wherein the simulated laser beam comprises a plurality of simulated rays, and wherein the determining the simulated laser beam comprises:
determining the incident angle of the simulation ray;
determining the simulation ray as an effective ray under the condition that the incident angle is less than or equal to the incident angle threshold value;
and determining the simulation ray as an invalid ray when the incident angle is larger than the incident angle threshold.
7. The simulation method of claim 6, wherein after the determining the angle of incidence of the simulated ray, the method further comprises:
and canceling the display of the invalid ray, and generating the simulation laser beam according to the valid ray.
8. The simulation method of claim 6, wherein the determining the incident angle of the simulated ray comprises:
and determining the incident angle according to the position information of the laser tracker, the pose information of the positioning piece and a preset vector.
9. The simulation method of claim 8, wherein the formula for determining the angle of incidence is:
Figure FDA0003751532380000021
wherein θ is the incident angle, N t For the predetermined vector, P s For position information of the laser tracker, P t And the position and the attitude information of the positioning piece.
10. The simulation method according to any one of claims 1 to 9, wherein in a case where the collision result is a collision, the method further comprises:
and adjusting the preset track, and re-executing the step of detecting the collision result of the simulation laser beam and the first simulation model and/or the third simulation model until the collision result is no collision.
11. The utility model provides a simulation device for robotic system, its characterized in that, robotic system includes arm and laser tracker, be provided with the setting element on the arm, laser tracker is used for acquireing the positional information of setting element, simulation device includes:
the generation module is used for generating a first simulation model of the mechanical arm, a second simulation model of the laser tracker and a third simulation model of the environmental object, wherein a target model component is arranged on the first simulation model, and the target model component is a simulation model of the positioning piece;
the acquisition module is used for acquiring parameter information of the laser tracker;
the simulation module is used for generating a simulation laser beam according to the parameter information, and the simulation laser beam is emitted to the target model assembly from the second simulation model;
the control module is used for controlling the first simulation model to move according to a preset track;
and the detection module is used for detecting a collision result of the simulation laser beam and the first simulation model and/or the third simulation model and determining a simulation result according to the collision result.
12. An emulation apparatus, comprising:
a memory for storing programs or instructions;
a processor for implementing the simulation method of any of claims 1 to 10 when executing the program or instructions.
13. A readable storage medium on which a program or instructions are stored, characterized in that the program or instructions, when executed by a processor, implement the simulation method according to any one of claims 1 to 10.
14. A simulation test platform, comprising:
the emulation apparatus according to claim 11 or 12; and/or
The readable storage medium of claim 13.
15. A computer program product stored on a storage medium, characterized in that the computer program product, when executed by a processor, implements the simulation method according to any of claims 1 to 10.
CN202210842077.8A 2022-07-18 2022-07-18 Simulation method, simulation device, readable storage medium and simulation test platform Pending CN115319803A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210842077.8A CN115319803A (en) 2022-07-18 2022-07-18 Simulation method, simulation device, readable storage medium and simulation test platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210842077.8A CN115319803A (en) 2022-07-18 2022-07-18 Simulation method, simulation device, readable storage medium and simulation test platform

Publications (1)

Publication Number Publication Date
CN115319803A true CN115319803A (en) 2022-11-11

Family

ID=83917355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210842077.8A Pending CN115319803A (en) 2022-07-18 2022-07-18 Simulation method, simulation device, readable storage medium and simulation test platform

Country Status (1)

Country Link
CN (1) CN115319803A (en)

Similar Documents

Publication Publication Date Title
Santolaria et al. Laser tracker-based kinematic parameter calibration of industrial robots by improved CPA method and active retroreflector
US8412371B2 (en) Laser welding system, laser welding method, and emitting device
JP5199452B2 (en) External system for improving robot accuracy
US9061421B2 (en) Robotic work object cell calibration method
US6822412B1 (en) Method for calibrating and programming of a robot application
US8485017B1 (en) Robotic work object cell calibration system
US20220147026A1 (en) Method and Apparatus for Improved Auto-Calibration of a Robotic Cell
JP6603289B2 (en) Robot, robot system, and robot coordinate system setting method
JPH07121214A (en) Measuring sensor device for robot, and calibration method and measuring method using the same
JP6228905B2 (en) Work robot installation status detection method
CN115319803A (en) Simulation method, simulation device, readable storage medium and simulation test platform
JP2023517395A (en) ADJUSTMENT METHOD, APPARATUS AND READABLE STORAGE MEDIUM OF TOOL HEAD
de Souza et al. Industrial robot programming by demonstration using stereoscopic vision and inertial sensing
WO2022181688A1 (en) Robot installation position measurement device, installation position measurement method, robot control device, teaching system, and simulation device
da Silva Santos et al. Evaluation of perpendicularity methods for a robotic end effector from aircraft industry
Nejat et al. High-precision task-space sensing and guidance for autonomous robot localization
US8319951B1 (en) Local positioning system
CN115185203A (en) Simulation method, simulation device, readable storage medium and simulation test platform
Allmacher et al. Optimizing development time through hybrid commissioning of control software
KR100336459B1 (en) Method for off-line control of robot
CN112800582B (en) Method for generating simulated laser line of structured light vision sensor
Thorkildsen Bruk av ekstern sensor for å korrigere robotbane i sanntid
CN112589805A (en) Dynamic path demonstration method in space environment
US20220371196A1 (en) Method, Device and System for Controlling Robot, Storage Medium and Terminal
Ganesh et al. Ultrasonic sensor-based motion control for robotic manipulators

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