Robot teaching method based on sphere bounding box and related equipment
By employing a sphere-bound box collision detection method in chemical experiments and updating spatial occupancy information in real time, the problem of lack of early warning in teleoperation is solved, achieving low-latency anti-collision warning and ensuring the stability and safety of robotic arm operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO INST OF MATERIALS TECH & ENG CHINESE ACAD OF SCI
- Filing Date
- 2026-03-31
- Publication Date
- 2026-05-12
AI Technical Summary
Existing teleoperation or teaching technologies lack proactive early warning mechanisms in chemical experiments, resulting in huge consumption of collision detection computing resources, leading to robotic arm tremors and operational instability, affecting safety and stability.
A collision detection method based on sphere bounding boxes is adopted. By constructing dynamic and static sphere bounding boxes, the spatial occupancy information is updated in real time, collision detection is performed, and control commands are generated to achieve low-latency real-time anti-collision warning.
It achieves low-latency real-time anti-collision warning, ensuring the smoothness and safety of chemical experimental operations, avoiding the movement jamming and shaking of the robotic arm, and ensuring the stable operation of chemical liquids.
Smart Images

Figure CN122008237A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of robot control and human-computer interaction technology, specifically relating to a robot teaching method and related equipment based on a spherical bounding box. Background Technology
[0002] With the development of laboratory automation, dual-arm collaborative robots are increasingly being used in chemical experiments to perform complex tasks such as pouring hazardous liquids and mixing multiple test tubes. However, chemical experimental scenarios have unique characteristics: the environment is filled with fragile glassware (such as beakers and graduated cylinders) and corrosive / flammable liquids, requiring extremely high levels of operational stability and safety.
[0003] Teleoperation or teaching technologies in related fields mostly use physics engines that employ full-mesh collision detection, such as PhysX and Bullet. This approach is typically binary, meaning that collision feedback is only provided when the object models actually overlap, failing to inform the operator of an impending collision before it occurs, leaving the operator with insufficient time to react.
[0004] Meanwhile, high-fidelity mesh collision detection consumes enormous computational resources. During high-dynamic movements of the dual arms, complex mesh calculations reduce the simulation frame rate, leading to increased communication latency between the virtual and real ends. This latency manifests as stuttering or overshooting jitter in the real robotic arm, easily causing chemical spills or glass breakage. In other words, related teleoperation or teaching technologies lack proactive warning mechanisms, and the computational latency caused by complex mesh calculations leads to jitter in the real robotic arm, all of which affect the smoothness and safety of operation.
[0005] Therefore, there is an urgent need to provide a robot teaching method and related equipment based on a spherical bounding box. Summary of the Invention
[0006] The main objective of this invention is to provide a robot teaching method and related equipment based on a spherical bounding box, so as to overcome the shortcomings of the prior art.
[0007] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0008] An embodiment of the present invention provides a robot teaching method based on a spherical bounding box, comprising the following steps:
[0009] A virtual chemical experiment scene corresponding to a real working environment is obtained. The virtual chemical experiment scene includes a virtual robot model, a chemical experiment equipment model, and spatial occupancy information of a spherical enclosure. The spatial occupancy information is used to indicate the spatial occupancy range of the moving parts of the virtual robot model and the experimental equipment in the chemical experiment equipment model in the virtual chemical experiment scene.
[0010] Collect motion data from the teaching input device, and drive the virtual robot in the chemical experiment virtual scene to perform chemical action drills based on the motion data;
[0011] During the movement of the virtual robot, the spatial occupancy information is updated in real time; collision detection results between the bounding boxes of each sphere are obtained based on the updated spatial occupancy information; and control commands for sending to the real robot are generated based on the collision detection results.
[0012] In a preferred embodiment, the sphere bounding box includes a dynamic sphere bounding box and a static environment sphere bounding box; the dynamic sphere bounding box is a dynamic virtual sphere that surrounds one or more target positions of the end gripper of the virtual robot model; the static environment sphere bounding box is a static virtual sphere that surrounds the test equipment, and the dynamic virtual sphere and the static virtual sphere are larger than the actual geometric contour of their corresponding objects.
[0013] In a preferred embodiment, obtaining the collision detection results between the bounding boxes of each sphere based on the updated space occupancy information includes:
[0014] Based on the updated space occupancy information, obtain the distance data between the centers of any two sphere bounding boxes; when the distance data is less than its corresponding warning threshold, the collision detection result between the two is considered to trigger a warning;
[0015] The method further includes: switching the visual state of the virtual ball in the virtual scene whose collision detection result triggers an early warning, and / or generating warning information and sending it to the warning device.
[0016] In a preferred embodiment, when the collision detection result triggers an early warning, the step of generating control instructions for sending to the real robot based on the collision detection result includes: generating a forced blocking instruction and sending it to the real robot.
[0017] In a preferred embodiment, when the collision detection result does not trigger an early warning, the step of generating control commands for sending to the real robot based on the collision detection result includes:
[0018] Based on the discrete joint angle data of the end effector corresponding to the collision detection result, a smooth trajectory is planned between the current angle and the target angle of the end effector of the real robot using a polynomial interpolation algorithm, and control commands are generated and sent to the real robot.
[0019] In a preferred embodiment, the method further includes:
[0020] When the virtual robot moves to a position where its view is obstructed by environmental objects within a virtual chemical experiment scenario, the environmental objects are treated as obstacles, and the transparency of the obstacles is adjusted to make the end effector gripper of the virtual robot and the experimental equipment it is working with visible.
[0021] An embodiment of the present invention also provides an electronic device, including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors according to any of the methods described in the above embodiments.
[0022] An embodiment of the present invention also provides a computer-readable storage medium storing a computer program that, when executed by at least one processor, implements the steps of the method described in any of the above embodiments.
[0023] An embodiment of the present invention also provides a computer program product, the computer program product including a computer program, which, when executed by at least one processor, implements the steps of the method described in any of the above embodiments.
[0024] Compared with the prior art, the beneficial effect of the present invention is that it abandons the traditional full-mesh collision detection and adopts a simplified sphere bounding box model for collision detection, thereby achieving low-latency real-time anti-collision warning and ensuring the stability and safety of chemical experimental operations. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a flowchart illustrating a robot teaching method based on a sphere bounding box according to one embodiment of this application.
[0027] Figure 2 This is a flowchart illustrating a robot teaching method based on a sphere bounding box according to one embodiment of this application.
[0028] Figure 3 This is a system architecture topology diagram according to one embodiment of this application. Detailed Implementation
[0029] The invention will be more fully understood through the following detailed description, which should be read in conjunction with the accompanying drawings. Detailed embodiments of the invention are disclosed herein; however, it should be understood that the disclosed embodiments are merely exemplary of the invention, which may be embodied in various forms. Therefore, the specific functional details disclosed herein should not be construed as limiting, but rather as the basis for the claims and as intended to teach those skilled in the art to employ the representative basis of the invention in different ways in any suitable detailed embodiment.
[0030] Example 1
[0031] See Figure 1 This embodiment provides a robot teaching method based on a spherical bounding box, including the following steps:
[0032] S101, Obtain a virtual chemical experiment scene corresponding to the real working environment. The virtual chemical experiment scene includes a virtual robot model, a chemical experiment equipment model, and spatial occupancy information of a spherical bounding box. The spatial occupancy information is used to indicate the spatial occupancy range of the moving parts of the virtual robot model and the experimental equipment in the chemical experiment equipment model in the virtual chemical experiment scene. The experimental equipment is, for example, a beaker, a test tube, a flask, etc.
[0033] In other words, for virtual chemical experiment scenarios, virtual robot models (such as dual-arm robots) and chemical experiment equipment models are built in a physical simulation engine based on a real chemical laboratory environment. For the robot's moving parts (such as end effectors and joints) and chemical experiment equipment models (fragile objects such as chemical beakers and test tube racks), a simplified sphere collider is built for position (such as distance) calculations, replacing the complex object surface mesh.
[0034] S102, collect motion data from the teaching input device, and drive the virtual robot in the chemical experiment virtual scene to perform chemical action drills based on the motion data;
[0035] Specifically, motion data from the teaching input device can be collected, and the virtual robot in the virtual scene can be driven in real time to perform chemical action drills through inverse kinematics algorithms.
[0036] S103, during the movement of the virtual robot, the spatial occupancy information is updated in real time; the collision detection results between the bounding boxes of each sphere are obtained according to the updated spatial occupancy information; and control commands for sending to the real robot are generated according to the collision detection results.
[0037] Unlike traditional physics engines that use full-mesh models for collision detection, this approach constructs spherical bounding boxes for the moving parts of the virtual robot model (such as end effectors and joints) and the chemical experimental equipment models (such as beakers and test tube racks) when building a virtual chemical experiment scene. It then obtains the spatial occupancy information (i.e., a parametric description consisting of the sphere's center coordinates and radius). Since the spherical bounding box only needs to store the 3D coordinates of the sphere's center and radius to fully describe the spatial occupancy, the data dimensionality is reduced compared to the mesh model, which requires storing a large amount of triangular facet information.
[0038] During the teaching process, motion data from the input is collected to drive the virtual robot in performing chemical action drills. In this process, the spatial occupancy information of the dynamic sphere bounding boxes is updated in real time based on the virtual robot's real-time pose (i.e., coordinate data is updated). The relative distances between the bounding boxes are calculated based on the updated spatial occupancy information to obtain collision detection results, achieving proactive warning before collisions rather than passive response after collisions. Furthermore, it can be configured to send control commands to the real robot only when there is no collision risk in the virtual verification; once a potential collision is detected (e.g., the distance between spheres is less than a safety threshold), command issuance is immediately blocked.
[0039] Therefore, this embodiment abandons the traditional full-mesh collision detection and adopts a simplified spherical bounding box model for collision detection, achieving low-latency real-time collision avoidance warning. This avoids the simulation frame rate fluctuations caused by the excessive computational load of traditional mesh collision detection, thereby eliminating the stuttering or speed jitter of the real robotic arm caused by virtual end computational latency. This ensures the continuity and uniformity of the robotic arm's movement during operations such as pouring chemical liquids and inserting pipettes, preventing liquid surface sloshing or spillage due to discontinuous movement, resulting in better stability and safety.
[0040] In one embodiment, the spherical enclosure includes a dynamic spherical enclosure and a static environment spherical enclosure. The dynamic spherical enclosure consists of dynamic virtual spheres surrounding one or more target positions of the end effector gripper of the virtual robot model. The static environment spherical enclosure consists of static virtual spheres surrounding the experimental equipment, and both the dynamic and static virtual spheres are larger than the actual geometric contours of their corresponding objects. It can be considered that both the dynamic and static protective spheres have buffer areas to prevent the robotic arm from colliding with the experimental object via the static protective sphere (static virtual sphere), and to prevent collisions between the two robotic arms via the dynamic protective sphere (dynamic virtual sphere).
[0041] As an example, dynamic probe balls that are dynamically attached to the end effector gripper, wrist, and elbow joint of a dual-arm robot are installed; static protective balls are installed around beakers, test tube racks, and precision instruments; the radius of the protective balls is larger than the actual geometric contour of the corresponding objects by a certain length to form a virtual safety buffer zone.
[0042] Furthermore, for high-value or fragile chemical equipment, the radius of the spherical enclosure is set to be 5mm-10mm larger than the actual physical outline of the object, thereby forming an invisible "airbag" in virtual space.
[0043] It can be assumed that the basic margin of 5mm-10mm is a basic safety distance estimated based on the typical repetitive positioning accuracy error of a real dual-arm collaborative robot and the delay time that may be caused by TCP / IP network communication.
[0044] In practical applications, the radius of the sphere's bounding box can be dynamically adjusted according to the operating speed (increased at high speeds and decreased at low speeds) to be greater than the actual physical contour of the object. For example, a "bounding box dynamic adaptive algorithm based on end-effector velocity" can be introduced. Its core logic is to expand the radius of the protective ball to provide early warning when the robotic arm operates at high speed; and to shrink the radius of the protective ball to avoid false alarms when delicate operations are required (such as inserting a test tube into a graduated cylinder at a very slow speed).
[0045] The following formulas or algorithms can be used: .
[0046] in This is the basic static protection radius, for example, 5mm. The instantaneous linear velocity of the bounding box of this part of the virtual robot. This is a compensation coefficient, which is positively correlated with the system's communication and computation delay time.
[0047] In one embodiment, obtaining the collision detection results between the bounding boxes of each sphere based on the updated space occupancy information includes:
[0048] Based on the updated space occupancy information, obtain the distance data between the centers of any two sphere bounding boxes; when the distance data is less than its corresponding warning threshold, the collision detection result between the two is considered to trigger a warning;
[0049] The method further includes: switching the visual state of the virtual ball in the virtual scene whose collision detection result triggers an early warning, and / or generating warning information and sending it to the warning device.
[0050] As an example, a visual distance monitoring and early warning mechanism is provided. During the movement of the virtual robot, the Euclidean distance between the bounding box of the dynamic sphere and the bounding box of the static environment sphere is calculated in real time. To avoid wasting computational power on multiple calculations in complex chemical scenarios such as dense test tubes and beakers, a two-stage collision detection algorithm of wide phase and narrow phase is adopted. In the wide phase stage, a spatial hash algorithm is used to divide the virtual chemical experiment scene into multiple three-dimensional grids, quickly filtering out potentially dangerous static spheres that are in the same grid or adjacent grids as the dynamic sphere of the virtual robotic arm. In the narrow phase stage, the center-to-center distance of only a few spheres filtered in the wide phase stage is accurately calculated. When the distance is less than a preset safety threshold, the part about to collide is highlighted on the visual feedback interface (by switching the visual state of the virtual sphere). Warning devices include buzzers and warning lights, providing warnings through sound and light.
[0051] In other words, the specific parts of the object about to collide can be precisely highlighted in the virtual scene (such as the "wrist sphere" and the "beaker A sphere"). Compared to full-screen red or text prompts, the spatial visual approach allows operators to immediately identify the location of danger, avoiding the difficulty in determining location caused by transparent glassware or blind spots in chemical experiments.
[0052] In one embodiment, when the collision detection result triggers an early warning, generating control instructions for sending to the real robot based on the collision detection result includes: generating a forced blocking instruction and sending it to the real robot.
[0053] As an example, safety logic can be determined based on distance calculations. Consider a scenario where two arms work together in a chemical experiment; there is usually strong coordination between the arms. If only the arm that triggers the warning is blocked, the other arm will continue along its original trajectory, easily disrupting the coordinated posture and leading to serious chemical spills or accidental interference.
[0054] If the data is within the safety threshold, the joint data is smoothly transmitted to the real robot using an interpolation algorithm. If either arm triggers the warning threshold, the transmission of commands to the real robot is immediately blocked to prevent physical collisions. In other words, a global emergency stop is issued in this situation, causing both arms to stop simultaneously and maintain their current safe pose, waiting for the teaching pendant to replan the trajectory.
[0055] In one embodiment, when the collision detection result does not trigger an early warning, the step of generating control instructions for sending to the real robot based on the collision detection result includes:
[0056] Based on the discrete joint angle data of the end effector corresponding to the collision detection result, a smooth trajectory is planned between the current angle and the target angle of the end effector of the real robot using a polynomial interpolation algorithm, and control commands are generated and sent to the real robot.
[0057] As an example, a fifth-order polynomial interpolation algorithm can be introduced. After receiving the latest target joint angle, a smooth trajectory is planned between the current angle and the target angle to ensure that the real robot operates without jitter.
[0058] In one embodiment, the method further includes:
[0059] When the virtual robot moves to a position where its view is obstructed by environmental objects within a virtual chemical experiment scenario, the environmental objects are treated as obstacles, and the transparency of the obstacles is adjusted to make the end effector gripper of the virtual robot and the experimental equipment it is working with visible.
[0060] Specifically, obscured obstacles can be rendered as semi-transparent to ensure that the operator can clearly see the relative positions of the interaction area between the virtual robot and the chemical experimental equipment.
[0061] To facilitate understanding of this case, the following is in conjunction with the appendix. Figure 2 , Figure 3 The invention will be further described in detail with specific examples.
[0062] The system described in this embodiment mainly consists of three parts:
[0063] First layer: Teaching interaction terminal, including two master hand teaching arms, used to collect the operator's hand pose (position) , , and posture , , ).
[0064] This layer includes a master controller / teaching arm and an augmented reality display terminal (display: showing augmented reality images). The operator executes teaching actions through the master controller, generating 1. pose data (including position and orientation information), which is uploaded in real time to the Isaac Sim simulation platform in the second layer via a communication link. Simultaneously, the display terminal receives visual rendering feedback from the simulation platform, presenting the operator with virtual robot status, sphere bounding box space occupancy, and collision warning visualization information in augmented reality (AR) format, forming a closed-loop human-machine interaction circuit.
[0065] Second layer: Simulation workstation / PC (simulation computing end): A workstation equipped with a high-performance GPU, such as a hardware platform configured with NVIDIA RTX series graphics cards, running the NVIDIA Isaac Sim simulation platform.
[0066] This layer integrates the Isaac Sim simulation platform, core security logic (module), and TCP / IP communication module.
[0067] The Isaac Sim simulation platform drives the virtual model (receives the pose data of the main hand, drives the movement of the virtual model through inverse kinematics calculation, and updates the spatial occupancy information of the dynamic sphere bounding box in real time).
[0068] When the virtual robot's end effector gripper closes and successfully grasps the beaker, the system automatically switches the beaker's bounding box property from static to dynamic and associates its kinematic coordinates with the robot arm's end effector coordinate system. During subsequent movement, the beaker's bounding box coordinates are updated in real time with the robot arm; when the beaker is released, its state returns to static.
[0069] The embedded physics engine performs sphere distance calculations, resolving the geometric distance between the dynamic sphere and the static sphere in real time. It generates distance data and inputs it into the safety interlock logic unit for threshold comparison. This unit outputs a judgment result (safe / blocking) based on a preset safety strategy, enabling proactive intervention decisions before a collision.
[0070] The instructions are sent to the third layer via the TCP / IP communication module using standard protocols (such as Socket). If the instruction is determined to be "blocked", the data stream is interrupted to ensure that dangerous instructions do not enter the physical layer.
[0071] The third layer: Real chemical experiment scenario (real execution end): includes two collaborative robotic arms, such as JAKA Zu series or Universal Robots UR series, installed on both sides of the experimental table to form a dual-arm collaborative system.
[0072] This layer includes the JAKA robot controller, a dual-arm collaborative robot, and fragile experimental equipment.
[0073] The JAKA controller receives discrete joint angle data from the simulation layer via TCP / IP and reconstructs a continuous, smooth trajectory locally using a built-in polynomial interpolation algorithm. During physical action execution, the dual-arm collaborative robot performs physical actions according to the planned trajectory, precisely manipulating fragile experimental equipment (glassware, chemical reagent containers, etc.). Since the second layer has completed collision pre-detection and command interruption, the commands received by the physical layer are all virtual-verified safe trajectories, thus ensuring the physical safety of high-risk chemical experiments.
[0074] The detailed technical implementation steps are as follows:
[0075] Step S1: Physical Scene Construction Based on USD Process (S1. Constructing a Simplified Sphere Bounding Box for a Chemical Experiment Virtual Scene)
[0076] 1. Geometric Modeling: Using CAD software or large 3D models, a 1:1 model of the real laboratory environment, including lab benches, shelves, beakers, liquid containers, etc., is created.
[0077] 2. Sphere Collider Configuration: Virtual spheres are dynamically bound to the most collision-prone areas, such as the end effector gripper of the virtual robotic arm, and at the wrist and elbow joints. Static virtual spheres are used as static bounds to surround the beaker and graduated cylinder. Compared to complex collision meshes, the sphere model only needs to store the coordinates of the sphere's center. and radius The computational load is extremely low.
[0078] 3. Virtual camera configuration: Preset no fewer than 3 virtual camera positions in the virtual scene (such as "top view", "left arm end view", "right arm end view"), and allow the operator to freely rotate the view using the mouse.
[0079] Step S2: Kinematic mapping and solution of teaching data (S2. Acquire pose data of teaching input device)
[0080] 1. Data Acquisition: Write a Python script to read the real-time pose data of the teaching arm. .
[0081] 2. Spatial mapping: Mapping the pose of the teaching arm in the coordinate system. Convert to target pose in virtual robot base coordinate system .
[0082] 3. Technical Details: Incremental control mode is introduced, i.e. = ,in It is a proportional coefficient, allowing operators to make fine adjustments down to the millimeter level. This represents the target pose change of the virtual robot.
[0083] 4. Inverse Kinematics (IK) Solution (Virtual Robot Inverse Kinematics IK Solution Drives Virtual Model Motion): Utilizing Isaac Sim's built-in Lula kinematics solver or RMPflow algorithm, based on the target pose... Real-time calculation of the angles of the six joints of the virtual robot = Compared to traditional analytical solutions, this algorithm can automatically handle singularities and generate smooth trajectories.
[0084] Step S3: Active early warning mechanism based on the distance to the ball's center (S3. Core judgment: distance to the ball's center < safety threshold)
[0085] 1. Distance Calculation: In each simulation frame, all dynamic spheres are traversed in real time. With static sphere And the dynamic ball of the other arm Calculate the Euclidean distance between the centers of the two spheres. Yes (collision risk exists); No (safety verification passed).
[0086] 2. Tiered early warning logic: In the safe zone The virtual ball is displayed as green, indicating the system is operating normally; within the warning zone. The virtual ball turns yellow and emits a rapid warning sound, alerting the operator to move too quickly or get too close; this is in the danger zone. When the virtual ball turns red, it is determined that a collision is imminent. In this case, a graded warning mechanism is triggered to simulate a ball changing color / sound alarm.
[0087] Step S3 may also include: an active early warning mechanism based on the distance from the ball's center.
[0088] Auxiliary guide line: The end trajectory prediction line and the target alignment auxiliary coordinate system are superimposed and displayed in the virtual screen to assist the operator in accurate positioning.
[0089] Physical safety pre-verification: This involves calculating the joint angles... Before sending data to the real robot, the simulation engine first checks whether the virtual robot has collided (Self-collision or Environment-collision) within the current physical frame.
[0090] The logical judgment process is as follows: if a collision is detected, the system immediately blocks the issuance of commands and alerts the operator in the virtual interface by highlighting red. The real robot remains stationary, thereby absolutely ensuring the safety of the real equipment.
[0091] Step S4: Virtual-Real Synchronous Communication and Security Control Mechanism
[0092] 1. Communication protocol and frequency synchronization:
[0093] TCP / IP socket communication is used. The simulation terminal acts as the client, and the real robot controller acts as the server.
[0094] Data packet format: {Timestamp, Joint_1, ..., Joint_6, Gripper_State,Checksum}.
[0095] Frequency control: The simulation physical step size is set to 60Hz-120Hz, while the actual robot control cycle is typically 125Hz. In this embodiment, a buffer is set up on the Python side to smoothly send the virtual joint angle data to the robot SDK interface at a frequency of 25Hz.
[0096] 2. Delay compensation and motion smoothing:
[0097] Due to network latency, real robots may experience motion "lag". This invention introduces a fifth-order polynomial interpolation algorithm (S4. Fifth-order polynomial interpolation trajectory smoothing processing) at the real robot controller. After receiving the latest target joint angle, the controller plans a smooth trajectory between the current angle and the target angle to ensure that the robotic arm operates without jitter.
[0098] Step S5: Augmented Reality Assistance
[0099] When the virtual robotic arm moves to a position that obstructs the view (such as being blocked by a shelf), the obstructed obstacle is automatically rendered as semi-transparent to ensure that the operator can clearly see the relative position of the robotic arm's end and the beaker.
[0100] Example 2
[0101] This embodiment also provides an electronic device, the specific embodiment of which is consistent with the embodiments described in the above embodiments and the technical effects achieved, and some contents will not be repeated.
[0102] The electronic device includes one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors according to any of the methods described in Embodiment 1 above.
[0103] Example 3
[0104] This embodiment also provides a robot teaching system, which includes the electronic device described in Embodiment 2.
[0105] Example 4
[0106] This application also provides a computer-readable storage medium, the specific embodiments of which are consistent with the embodiments described above and the technical effects achieved, and some contents will not be repeated.
[0107] The computer-readable storage medium stores a computer program that, when executed by at least one processor, implements the steps of any of the above methods or the functions of any of the above electronic devices.
[0108] A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. In embodiments of this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0109] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable storage medium may also be any computer-readable medium capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, or any suitable combination thereof. Program code for performing operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on a user computing device, partially on a user device, as a standalone software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to user computing devices via any type of network, including local area networks (LANs) or wide area networks (WANs), or they can be connected to external computing devices (e.g., via the Internet using an Internet service provider).
[0110] Example 5
[0111] This application also provides a program product embodiment, wherein the computer program product includes a computer program, and when the computer program is executed by at least one processor, it implements the steps of the method described in any one of the method embodiments. Its specific embodiments are consistent with the embodiments described above and the technical effects achieved are the same, and some details will not be repeated.
[0112] Although the invention has been described with reference to illustrative embodiments, those skilled in the art will understand that various other changes, omissions, and / or additions can be made without departing from the spirit and scope of the invention, and that elements of the described embodiments can be substituted with substantially equivalents. Furthermore, many modifications can be made without departing from the scope of the invention to adapt particular situations or materials to the teachings of the invention. Therefore, this document is not intended to limit the invention to the specific embodiments disclosed for carrying out the invention, but rather to include all embodiments falling within the scope of the appended claims.
Claims
1. A robot teaching method based on a spherical bounding box, characterized in that, Includes the following steps: A virtual chemical experiment scene corresponding to a real working environment is obtained. The virtual chemical experiment scene includes a virtual robot model, a chemical experiment equipment model, and spatial occupancy information of a spherical enclosure. The spatial occupancy information is used to indicate the spatial occupancy range of the moving parts of the virtual robot model and the experimental equipment in the chemical experiment equipment model in the virtual chemical experiment scene. Collect motion data from the teaching input device, and drive the virtual robot in the chemical experiment virtual scene to perform chemical action drills based on the motion data; During the movement of the virtual robot, the spatial occupancy information is updated in real time; collision detection results between the bounding boxes of each sphere are obtained based on the updated spatial occupancy information; and control commands for sending to the real robot are generated based on the collision detection results.
2. The robot teaching method according to claim 1, characterized in that, The sphere bounding box includes a dynamic sphere bounding box and a static environment sphere bounding box; the dynamic sphere bounding box is a dynamic virtual sphere that surrounds one or more target positions of the end gripper of the virtual robot model; the static environment sphere bounding box is a static virtual sphere that surrounds the test equipment, and both the dynamic virtual sphere and the static virtual sphere are larger than the actual geometric contour of their corresponding objects.
3. The robot teaching method according to claim 2, characterized in that, The step of obtaining collision detection results between the bounding boxes of each sphere based on the updated spatial occupancy information includes: Based on the updated space occupancy information, obtain the distance data between the centers of any two sphere bounding boxes; when the distance data is less than its corresponding warning threshold, the collision detection result between the two is considered to trigger a warning; The method further includes: switching the visual state of the virtual ball in the virtual scene whose collision detection result triggers an early warning, and / or generating warning information and sending it to the warning device.
4. The robot teaching method according to claim 3, characterized in that, When the collision detection result triggers an early warning, the step of generating control instructions to be sent to the real robot based on the collision detection result includes: generating a forced blocking instruction and sending it to the real robot.
5. The robot teaching method according to claim 3, characterized in that, When the collision detection result does not trigger an early warning, the step of generating control commands for sending to the real robot based on the collision detection result includes: Based on the discrete joint angle data of the end effector corresponding to the collision detection result, a smooth trajectory is planned between the current angle and the target angle of the end effector of the real robot using a polynomial interpolation algorithm, and control commands are generated and sent to the real robot.
6. The robot teaching method according to claim 1, characterized in that, The method further includes: When the virtual robot moves to a position where its view is obstructed by environmental objects within a virtual chemical experiment scenario, the environmental objects are treated as obstacles, and the transparency of the obstacles is adjusted to make the end effector gripper of the virtual robot and the experimental equipment it is working with visible.
7. An electronic device, characterized in that, It includes one or more processors and memory; one or more programs are stored in the memory and configured to be executed by the one or more processors according to any one of claims 1-6.
8. A robot teaching system, characterized in that, The robot teaching system includes the electronic device described in claim 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by at least one processor, implements the steps of the method according to any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by at least one processor, implements the steps of the method according to any one of claims 1-6.