CN114986524A - Mechanical arm track planning method and device based on brain-computer interface and electronic equipment - Google Patents

Mechanical arm track planning method and device based on brain-computer interface and electronic equipment Download PDF

Info

Publication number
CN114986524A
CN114986524A CN202210941922.7A CN202210941922A CN114986524A CN 114986524 A CN114986524 A CN 114986524A CN 202210941922 A CN202210941922 A CN 202210941922A CN 114986524 A CN114986524 A CN 114986524A
Authority
CN
China
Prior art keywords
mechanical arm
dimensional
configuration list
acquiring
dimensional point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210941922.7A
Other languages
Chinese (zh)
Other versions
CN114986524B (en
Inventor
李栋辉
王庆滨
赵松朋
邹伟
张大朋
余山
韩新勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
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 Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN202210941922.7A priority Critical patent/CN114986524B/en
Publication of CN114986524A publication Critical patent/CN114986524A/en
Application granted granted Critical
Publication of CN114986524B publication Critical patent/CN114986524B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1664Programme controls characterised by programming, planning systems for manipulators characterised by motion, path, trajectory planning
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • B25J9/161Hardware, e.g. neural networks, fuzzy logic, interfaces, processor

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a mechanical arm track planning method and device based on a brain-computer interface and electronic equipment, and relates to the technical field of robots, wherein the method comprises the following steps: acquiring a first configuration list; performing collision detection based on the three-dimensional head area and the first configuration list, and deleting three-dimensional points where the mechanical arm collides with the three-dimensional head area and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list based on a collision detection result; taking the deleted first configuration list as a second configuration list, and acquiring a target access sequence of the mechanical arm to all three-dimensional points in the second configuration list; based on the second configuration list and the target access sequence, a simulated implantation track formed by the movement of the mechanical arm in the three-dimensional head area is obtained, the simulated implantation track is used for implanting the brain-computer interface into the three-dimensional head area, and the problem that the simulated implantation track formed by the movement of the mechanical arm in the highly disordered three-dimensional head area cannot be quickly and safely obtained is solved.

Description

Mechanical arm track planning method and device based on brain-computer interface and electronic equipment
Technical Field
The invention relates to the technical field of robots, in particular to a method and a device for planning a mechanical arm track based on a brain-computer interface and electronic equipment.
Background
Brain-computer interface (BCI) refers to a direct connection created between the brain of a human or animal and an external device to achieve information exchange between the brain and the device. The brain-computer interface collects electroencephalogram signals from cerebral cortex through signal collection equipment, converts the electroencephalogram signals into target signals which can be identified by a computer through operations such as amplification, filtering, A/D conversion and the like, then preprocesses the target signals, extracts characteristic signals from the preprocessed target signals, and then performs mode identification by utilizing the characteristic signals to realize information interaction between the brain and the equipment.
In the prior art, because the head area is a highly disordered three-dimensional environment, the mechanical arm easily collides with the three-dimensional head area in the process of implanting the brain-computer interface into the three-dimensional head area, which not only increases the implantation time, but also causes many production safety problems, so that a simulated implantation track formed by the movement of the mechanical arm in the highly disordered three-dimensional head area cannot be quickly and safely obtained, and the brain-computer interface is implanted into the three-dimensional head area based on the simulated implantation track.
Therefore, in the prior art, a simulated implantation trajectory formed by the movement of the mechanical arm in a highly disordered three-dimensional head region cannot be quickly and safely acquired, and then a brain-computer interface is implanted into the three-dimensional head region based on the simulated implantation trajectory.
Disclosure of Invention
The invention provides a mechanical arm track planning method and device based on a brain-computer interface and electronic equipment, which are used for solving the technical problem that a simulated implantation track formed by the motion of a mechanical arm in a highly disordered three-dimensional head area cannot be quickly and safely obtained in the prior art, and then the brain-computer interface is implanted into the three-dimensional head area based on the simulated implantation track, so that the implantation efficiency and safety of the brain-computer interface are improved, and various production safety problems are avoided.
The invention provides a mechanical arm track planning method based on a brain-computer interface, which comprises the following steps: acquiring a first configuration list, wherein the first configuration list comprises each three-dimensional point in a three-dimensional head area and mechanical arm joint corner data of a mechanical arm at each three-dimensional point in the three-dimensional head area; performing collision detection based on the three-dimensional head area and the first configuration list, and deleting three-dimensional points where the mechanical arm collides with the three-dimensional head area and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list based on a collision detection result; taking the deleted first configuration list as a second configuration list, and acquiring a target access sequence of the mechanical arm to all three-dimensional points in the second configuration list; and acquiring a simulated implantation track formed by the movement of the mechanical arm in the three-dimensional head region based on the second configuration list and the target access sequence, wherein the simulated implantation track is used for implanting a brain-computer interface into the three-dimensional head region.
According to the mechanical arm trajectory planning method based on the brain-computer interface provided by the invention, the acquiring of the first configuration list comprises the following steps: acquiring mechanical arm pose data of the mechanical arm at each three-dimensional point in the three-dimensional head area, wherein the mechanical arm pose data comprise three-dimensional coordinate values and coordinate axis rotation angles of the mechanical arm; converting the mechanical arm pose data into mechanical arm joint corner data based on a kinematics inverse solution operation strategy, wherein the mechanical arm joint corner data comprises a plurality of mechanical arm joints and corners of each mechanical arm joint; and obtaining the first configuration list based on each three-dimensional point in the three-dimensional head area and the mechanical arm joint corner data corresponding to each three-dimensional point.
According to the mechanical arm track planning method based on the brain-computer interface provided by the invention, the collision detection is carried out based on the three-dimensional head area and the first configuration list, and three-dimensional points where the mechanical arm collides with the three-dimensional head area and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list are deleted based on the collision detection result, the mechanical arm track planning method comprises the following steps: acquiring a first bounding box corresponding to each three-dimensional point in the first configuration list and a second bounding box corresponding to the three-dimensional head region of the mechanical arm; for each of the first bounding boxes, determining whether the first bounding box intersects the second bounding box; under the condition that the first enclosure box is intersected with the second enclosure box, judging whether a mechanical arm is intersected with the three-dimensional head area at a three-dimensional point corresponding to the first enclosure box; and under the condition that the three-dimensional points corresponding to the first enclosure box of the mechanical arm are intersected with the three-dimensional head area, deleting the three-dimensional points and the corresponding mechanical arm joint rotation angle data in the first configuration list.
According to the mechanical arm trajectory planning method based on the brain-computer interface provided by the invention, the acquiring of the first bounding box corresponding to the mechanical arm at each three-dimensional point in the first configuration list and the second bounding box corresponding to the three-dimensional head region comprises the following steps: acquiring mechanical arm coordinate extreme value data of the mechanical arm at each three-dimensional point in the first configuration list, wherein the mechanical arm coordinate extreme value data comprises a plurality of mechanical arm joints of the mechanical arm and coordinate extreme value data of each mechanical arm joint; acquiring a first enclosure box corresponding to each mechanical arm joint in the mechanical arms at each three-dimensional point in the first configuration list based on the extreme value data of the mechanical arm coordinates; and acquiring the region coordinate extreme value data of the three-dimensional head region, and acquiring a second enclosure box corresponding to the three-dimensional head region based on the region coordinate extreme value data.
According to the mechanical arm trajectory planning method based on the brain-computer interface provided by the invention, the acquiring of the target access sequence of the mechanical arm to all three-dimensional points in the second configuration list comprises the following steps: acquiring a current iteration count and a current access sequence of the mechanical arm to all three-dimensional points in the second configuration list; acquiring a current access path corresponding to the current access sequence based on the current access sequence and the three-dimensional coordinates of each three-dimensional point in the second configuration list; acquiring a local access sequence between any two nonadjacent three-dimensional points in the current access sequence, and turning the local access sequence in the current access sequence to obtain a first access sequence; acquiring a first access path corresponding to the first access sequence based on the first access sequence and the three-dimensional coordinates of each three-dimensional point in the second configuration list; updating the current access order and the current iteration count based on the current access path and the first access path; taking the updated current access sequence as a new current access sequence, and taking the updated current iteration count as a new current iteration count; and repeatedly executing the steps until the current iteration count reaches the maximum iteration number, and taking the finally obtained current access sequence as the target access sequence.
According to the mechanical arm trajectory planning method based on the brain-computer interface provided by the invention, the simulated implantation trajectory formed by the movement of the mechanical arm in the three-dimensional head region is acquired based on the second configuration list and the target access sequence, and the method comprises the following steps: constructing a three-dimensional point cascade graph based on the target access sequence and the second configuration list; the three-dimensional point cascade graph comprises a plurality of cascade three-dimensional point layers and a plurality of vertexes corresponding to each three-dimensional point layer, wherein each three-dimensional point layer corresponds to one three-dimensional point, and the vertexes represent a plurality of groups of mechanical arm joint corner data corresponding to the three-dimensional points; traversing each three-dimensional point layer in the three-dimensional point cascade graph, respectively selecting a vertex in two adjacent three-dimensional point layers, and acquiring a moving path and a moving cost of the mechanical arm moving between the two adjacent three-dimensional point layers based on the two selected vertices; repeatedly executing the previous step until all vertexes in the three-dimensional point cascade graph are traversed, and finally obtaining all moving paths and the moving cost; traversing each three-dimensional point layer in the three-dimensional point cascade graph, and screening a target moving path from a plurality of moving paths corresponding to two adjacent three-dimensional point layers based on the moving cost to obtain a plurality of target moving paths; and acquiring a target configuration list based on a plurality of target moving paths and the second configuration list, and acquiring a simulated implantation track formed by the mechanical arm in the three-dimensional head area based on the target configuration list.
According to the mechanical arm trajectory planning method based on the brain-computer interface, the method for obtaining the moving path and the moving cost of the mechanical arm between the two adjacent three-dimensional point layers based on the two selected vertexes comprises the following steps: acquiring mechanical arm joint corner data corresponding to the two selected vertexes and the maximum corner angular speed of the mechanical arm joint; acquiring a mechanical arm joint corner difference value based on mechanical arm joint corner data corresponding to the two vertexes, and acquiring maximum joint corner time based on the mechanical arm joint corner difference value and the maximum corner angular speed; acquiring corner symbol switching cost of the mechanical arm joint based on the mechanical arm joint corner data corresponding to the two vertexes; acquiring the extra cost of the mechanical arm moving between the two adjacent three-dimensional point layers based on the corner symbol switching cost and a preset extra cost coefficient; and acquiring the movement cost of the mechanical arm moving between the two adjacent three-dimensional point layers based on the maximum joint corner time and the additional cost.
The invention also provides a mechanical arm track planning device based on the brain-computer interface, which comprises: the configuration acquisition module is used for acquiring a first configuration list, wherein the first configuration list comprises each three-dimensional point in a three-dimensional head area and mechanical arm joint corner data of a mechanical arm at each three-dimensional point in the three-dimensional head area; the collision detection module is used for performing collision detection based on the three-dimensional head area and the first configuration list, and deleting three-dimensional points where the mechanical arm collides with the three-dimensional head area and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list based on a collision detection result; the sequence determining module is used for taking the deleted first configuration list as a second configuration list and acquiring the target access sequence of the mechanical arm to all three-dimensional points in the second configuration list; and the track generation module is used for acquiring a simulated implantation track formed by the movement of the mechanical arm in the three-dimensional head area based on the second configuration list and the target access sequence, wherein the simulated implantation track is used for implanting a brain-computer interface into the three-dimensional head area.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the mechanical arm trajectory planning method based on the brain-computer interface is realized.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for brain-computer interface based mechanical arm trajectory planning as described in any of the above.
According to the mechanical arm track planning method, device and electronic equipment based on the brain-computer interface, collision detection is carried out based on the three-dimensional head area and the first configuration list, three-dimensional points where the mechanical arm collides with the three-dimensional head area and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list are deleted based on the collision detection result, so that the mechanical arm is prevented from colliding with the three-dimensional head area in the process of implanting the brain-computer interface into the three-dimensional head area, the implantation efficiency and safety of the brain-computer interface are improved, and various production safety problems are avoided; through setting up more reasonable target access order based on the second configuration list, can improve the access efficiency of robotic arm to a plurality of three-dimensional points in the three-dimensional head region, and then can improve the implantation efficiency of the robotic arm with brain machine interface implantation to a plurality of three-dimensional points in the three-dimensional head region, solved among the prior art can't obtain the simulation implantation orbit that the robotic arm moved in highly mixed and disorderly three-dimensional head region fast safely, and then implanted the three-dimensional head region with brain machine interface based on the simulation implantation orbit technical problem.
Drawings
In order to more clearly illustrate the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is one of the flow diagrams of the mechanical arm trajectory planning method based on brain-computer interface provided by the present invention;
FIG. 2 is a second schematic flow chart of the mechanical arm trajectory planning method based on brain-computer interface according to the present invention;
fig. 3 is a third schematic flow chart of the mechanical arm trajectory planning method based on the brain-computer interface according to the present invention;
FIG. 4 is a fourth schematic flowchart of the method for planning the trajectory of the mechanical arm based on the brain-computer interface according to the present invention;
FIG. 5 is a fifth flowchart of the method for planning the trajectory of the mechanical arm based on the brain-computer interface according to the present invention;
FIG. 6 is a sixth schematic flowchart of a method for planning a trajectory of a mechanical arm based on a brain-computer interface according to the present invention;
FIG. 7 is a schematic diagram of a three-dimensional point cascade diagram in an embodiment of the present invention;
fig. 8 is a seventh schematic flowchart of the mechanical arm trajectory planning method based on the brain-computer interface according to the present invention;
fig. 9 is a schematic structural diagram of a mechanical arm trajectory planning device of a brain-computer interface provided by the present invention;
fig. 10 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
The mechanical arm trajectory planning method based on the brain-computer interface of the present invention is described below with reference to fig. 1 to 7. As shown in fig. 1, the present invention provides a mechanical arm trajectory planning method based on a brain-computer interface, including:
in step S1, a first configuration list is acquired, where the first configuration list includes each three-dimensional point in the three-dimensional head region and robot arm joint angle data of the robot arm at each three-dimensional point in the three-dimensional head region.
Step S2, collision detection is carried out based on the three-dimensional head area and the first configuration list, and three-dimensional points where the mechanical arm collides with the three-dimensional head area and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list are deleted based on the collision detection result.
Step S3, the first configuration list after the deletion processing is used as a second configuration list, and the target access order of the robot to all three-dimensional points in the second configuration list is acquired.
And step S4, acquiring a simulated implantation track formed by the movement of the mechanical arm in the three-dimensional head area based on the second configuration list and the target access sequence, wherein the simulated implantation track is used for implanting the brain-computer interface into the three-dimensional head area.
And the simulated implantation track represents a motion track formed by the motion of the mechanical arm in the three-dimensional head area, which is simulated based on the second configuration list and the target access sequence.
Further, the mechanical arm is controlled to sequentially implant the brain-computer interface to each three-dimensional point, in the simulated implantation track, of the three-dimensional head area without collision of the mechanical arm, so that the brain-computer interface is implanted to the designated head position in the three-dimensional head area.
In the above steps S1 to S4, collision detection is performed based on the three-dimensional head region and the first configuration list, and three-dimensional points where the mechanical arm collides with the three-dimensional head region and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list are deleted based on the collision detection result, so as to prevent the mechanical arm from colliding with the three-dimensional head region in the process of implanting the brain-computer interface into the three-dimensional head region, improve the implantation efficiency and safety of the brain-computer interface, and avoid causing many production safety problems; through setting up more reasonable target access order based on the second configuration list, can improve the access efficiency of robotic arm to a plurality of three-dimensional points in the three-dimensional head region, and then can improve the implantation efficiency of the robotic arm with brain machine interface implantation to a plurality of three-dimensional points in the three-dimensional head region, solved among the prior art can't obtain the simulation implantation orbit that the robotic arm moved in highly mixed and disorderly three-dimensional head region fast safely, and then implanted the three-dimensional head region with brain machine interface based on the simulation implantation orbit technical problem.
In one embodiment, as shown in fig. 2, the above step S1 includes steps S11 to S13, wherein:
step S11, acquiring robot arm position data of the robot arm at each three-dimensional point in the three-dimensional head region, where the robot arm position data includes a three-dimensional coordinate value of the robot arm and a coordinate axis rotation angle.
Wherein the three-dimensional coordinate values include an x-coordinate, a y-coordinate, and a z-coordinate. The coordinate axis rotation angles include an x-axis rotation angle, a y-axis rotation angle, and a z-axis rotation angle. Where the x-axis rotation angle indicates a rotation angle of rotation around the x-axis. The y-axis rotation angle indicates a rotation angle of rotation around the y-axis. The z-axis rotation angle indicates a rotation angle of rotation around the z-axis.
And step S12, converting the mechanical arm pose data into mechanical arm joint corner data based on a kinematics inverse solution operation strategy, wherein the mechanical arm joint corner data comprises a plurality of mechanical arm joints and corners of each mechanical arm joint.
Optionally, the robot arm joint angle data includes six robot arm joints and an angle of rotation of each robot arm joint.
It should be noted that the process of converting the pose data of the mechanical arm into the joint rotation angle data of the mechanical arm may be referred to as solving the inverse kinematics of the mechanical arm. Kinematic inverse solution strategies (i.e., methods for solving inverse kinematics of a robotic arm) include, but are not limited to, analytical methods, geometric projection methods, and combinations of analytical and geometric projection methods. The analytical method comprises a method for converting the pose data of the mechanical arm into the joint corner data of the mechanical arm by adopting a pre-constructed inverse kinematics calculation model.
Step S13, a first configuration list is obtained based on each three-dimensional point in the three-dimensional head area and the mechanical arm joint corner data corresponding to each three-dimensional point.
In one embodiment, one of the rotation angles of the three coordinate axes is a variable, and the value range of the rotation angle is not limited. And assigning the coordinate axis rotation angle to a preset value set, wherein the preset value set is a group of values with discretization step length.
It should be noted that, because one of the three coordinate axis rotation angles is a variable, and a certain mechanical arm joint rotation angle data cannot be output when there is a variable in the input mechanical arm position data, by assigning the variable of the coordinate axis rotation angle as a preset value set, it is possible to ensure that the value of the coordinate axis rotation angle can be changed within a certain range, and it is also possible to ensure that a certain mechanical arm joint rotation angle data is output based on the input mechanical arm position data.
In one embodiment, because the value of one coordinate axis rotation angle is within the range of the preset value set, that is, the value thereof is multiple, the pose data of the mechanical arm corresponding to each three-dimensional point is multiple groups, and the joint corner data of the mechanical arm obtained by converting the pose data of the mechanical arm is also multiple groups, at this time, the multiple groups of joint corner data of the mechanical arm corresponding to each three-dimensional point can be represented by the following formula (1):
Figure 548851DEST_PATH_IMAGE001
wherein,
Figure 814747DEST_PATH_IMAGE002
representing a plurality of groups of mechanical arm joint corner data,
Figure 876113DEST_PATH_IMAGE003
representing the 1 st group of mechanical arm joint rotation angle data,
Figure 518447DEST_PATH_IMAGE004
representing the 2 nd group of arm joint rotation angle data,
Figure 732391DEST_PATH_IMAGE005
represents the j-th group of mechanical arm joint rotation angle data,
Figure 169188DEST_PATH_IMAGE006
and (5) representing the mth group of mechanical arm joint corner data, wherein m represents the number of the mechanical arm joint corner data.
In the case where the robot arm joint rotation angle data includes six robot arm joints and a rotation angle of each robot arm joint, each set of robot arm joint rotation angle data may be represented by the following formula (2):
Figure 983429DEST_PATH_IMAGE007
wherein,
Figure 898296DEST_PATH_IMAGE008
represents the j-th group of mechanical arm joint rotation angle data,
Figure 232325DEST_PATH_IMAGE009
the turning angle of the 1 st mechanical arm joint is shown,
Figure 89291DEST_PATH_IMAGE010
indicates the rotation angle of the 2 nd mechanical arm joint,
Figure 141561DEST_PATH_IMAGE011
indicates the rotation angle of the 3 rd mechanical arm joint,
Figure 860118DEST_PATH_IMAGE012
the turning angle of the 4 th mechanical arm joint is shown,
Figure 48654DEST_PATH_IMAGE013
indicates the rotation angle of the 5 th mechanical arm joint,
Figure 76522DEST_PATH_IMAGE014
the turning angle of the 6 th arm joint is shown.
The collision detection process in step S2 is preferably implemented based on a 2-Opt algorithm, where 2-Opt is an abbreviation for 2-optimization.
In one embodiment, as shown in fig. 3, the above step S2 includes steps S21 to S24, wherein:
step S21, acquiring a first bounding box corresponding to the robot arm at each three-dimensional point in the first configuration list and a second bounding box corresponding to the three-dimensional head region.
The bounding box is an algorithm for solving an optimal bounding space of a discrete point set, and the basic idea is to approximately replace a complex geometric object by a geometric body (called a bounding box) which is slightly larger in volume and simple in property. The objects in this embodiment are the robot arm and the three-dimensional head region.
Step S22, for each first bounding box, determines whether the first bounding box intersects with the second bounding box.
Step S23, in the case where the first enclosure box intersects the second enclosure box, determines whether the robot arm intersects the three-dimensional head region at a three-dimensional point corresponding to the first enclosure box.
Step S24, in a case where the robot arm intersects the three-dimensional head area at the three-dimensional point corresponding to the first bounding box, deleting the three-dimensional point and the robot arm joint rotation angle data corresponding to the three-dimensional point from the first configuration list.
In the above steps S21 to S24, by determining whether the first bounding box intersects with the second bounding box, and determining whether the robot arm intersects with the three-dimensional head region at the three-dimensional point corresponding to the first bounding box under the condition that the first bounding box intersects with the second bounding box, since the intersection algorithm of the first bounding box and the second bounding box is simpler than the intersection algorithm of the robot arm object at the three-dimensional point and the three-dimensional head region object, the method can quickly eliminate the non-intersecting objects, thereby simplifying the collision detection step and speeding up the collision detection efficiency.
In one embodiment, as shown in fig. 4, the step S21 includes steps S211 to S213, wherein:
step S211, obtaining extreme value data of mechanical arm coordinates of the mechanical arm at each three-dimensional point in the first configuration list, where the extreme value data of the mechanical arm coordinates includes multiple mechanical arm joints of the mechanical arm and extreme value data of coordinates of each mechanical arm joint.
The coordinate extreme value data comprise an x coordinate extreme value, a y coordinate extreme value and a z coordinate extreme value of the mechanical arm joint. The x-coordinate extremum includes a maximum x-coordinate and a minimum x-coordinate. The y-coordinate extremum includes a maximum y-coordinate and a minimum y-coordinate. The z-coordinate extremum includes a maximum z-coordinate and a minimum z-coordinate.
Step S212, obtaining a first enclosure box corresponding to each mechanical arm joint in the mechanical arm at each three-dimensional point in the first configuration list based on the extreme value data of the mechanical arm coordinate.
Specifically, for each three-dimensional point in the first configuration list, in the case that the robot arm is located at the three-dimensional point, the first bounding box corresponding to each robot arm joint at the three-dimensional point is acquired based on the coordinate extreme value data of each robot arm joint in the robot arm.
Step S213, obtaining area coordinate extreme value data of the three-dimensional head region, and obtaining a second bounding box corresponding to the three-dimensional head region based on the area coordinate extreme value data.
The area coordinate extreme value data comprises an x coordinate extreme value, a y coordinate extreme value and a z coordinate extreme value of the middle point of the three-dimensional head area.
In one embodiment, the first bounding box and the second bounding box are axis-aligned bounding boxes (AABBs), which are the smallest hexahedrons containing objects, whose sides are parallel to the axis. The first bounding box is the smallest hexahedron containing the joints of the mechanical arm. The second bounding box is the smallest hexahedron containing the three-dimensional head region.
Through the embodiment, the first bounding box and the second bounding box are constructed by the axis-aligned bounding boxes, and the axis-aligned bounding boxes can be constructed by only six basic geometric elements of the object, so that on one hand, the calculation amount of the bounding box construction process can be reduced and the calculation efficiency of the bounding box construction process can be improved by adopting the method, on the other hand, the calculation amount of the intersection calculation of the first bounding box and the second bounding box in the subsequent steps can also be reduced, and the calculation efficiency of the intersection calculation of the bounding boxes can be improved.
In one embodiment, the steps S22 to S24 further include: for each three-dimensional point in the first configuration list, under the condition that the mechanical arm is located at the three-dimensional point, whether a first bounding box corresponding to each mechanical arm joint in the mechanical arm at the three-dimensional point is intersected with a second bounding box is judged, under the condition that the first bounding box corresponding to any mechanical arm joint in the mechanical arm at the three-dimensional point is intersected with the second bounding box is judged, whether the mechanical arm is intersected with a three-dimensional head area at the three-dimensional point is judged, and under the condition that the mechanical arm is intersected with the three-dimensional head area at the three-dimensional point, the three-dimensional point and mechanical arm joint corner data corresponding to the three-dimensional point are deleted in the first configuration list.
In one embodiment, as shown in fig. 5, the above step S3 includes steps S31 to S37, wherein:
step S31, obtaining the current iteration count and the current access order of the robotic arm to all three-dimensional points in the second configuration list.
Step S32, obtaining a current access path corresponding to the current access order based on the current access order and the three-dimensional coordinates of each three-dimensional point in the second configuration list.
Step S33, obtaining a local access sequence between any two non-adjacent three-dimensional points in the current access sequence, and performing a flipping process on the local access sequence in the current access sequence to obtain a first access sequence.
For example, the current access sequence is (a, B, C, D, E, F, G), a local access sequence (B, C, D, E) between any two non-adjacent three-dimensional points B and E in the current access sequence is selected, the local access sequence in the current access sequence is inverted, and the inverted current access sequence is the first access sequence (a, E, D, C, B, F, G).
Step S34, obtaining a first access path corresponding to the first access order based on the first access order and the three-dimensional coordinates of each three-dimensional point in the second configuration list. Wherein the three-dimensional coordinates include an x-coordinate, a y-coordinate, and a z-coordinate.
In step S35, the current access order and the current iteration count are updated based on the current access path and the first access path.
In one embodiment, the path lengths of the current access path and the first access path are obtained and compared, and when the path length of the first access path is smaller than the path length of the current access path, the first access sequence is used as the updated current access sequence, and the current iteration count is assigned to zero. And under the condition that the path length of the first access path is greater than or equal to the path length of the current access path, not updating the current access sequence, and adding a value 1 to the current iteration count to obtain an updated current iteration count.
Further, the euclidean distance is used to calculate the path lengths of the current access path and the first access path, and the path length of the access path is shown in formula (3):
Figure 616088DEST_PATH_IMAGE015
wherein,
Figure 872757DEST_PATH_IMAGE016
the length of the path is indicated by,
Figure 430646DEST_PATH_IMAGE017
represents the three-dimensional coordinates of the start point of the access path, an
Figure 380147DEST_PATH_IMAGE018
Figure 875851DEST_PATH_IMAGE019
Represents the three-dimensional coordinates of the end point of the access path, an
Figure 201790DEST_PATH_IMAGE020
Step S36, the updated current access order is used as the new current access order, and the updated current iteration count is used as the new current iteration count.
And step S37, repeating the above steps until the current iteration count reaches the maximum iteration count, and taking the finally obtained current access sequence as the target access sequence.
In the above steps S31 to S37, the local access sequence in the current access sequence is inverted through multiple iterations to obtain the first access sequence, the path lengths of the current access path and the first access path are compared, and when the path length of the first access path is smaller than the path length of the current access path, the first access sequence is used as the updated current access sequence, so that the current access path corresponding to the finally obtained current access sequence is shortest, and the finally obtained current access sequence is used as the target access sequence, thereby improving the access efficiency of the robot arm to the plurality of three-dimensional points in the three-dimensional head region, and further improving the implantation efficiency of the robot arm in implanting the brain-computer interface to the plurality of three-dimensional points in the three-dimensional head region.
Preferably, the optimization process of the second configuration list in step S4 is implemented based on Dijkstra' S algorithm, so as to obtain the target configuration list.
In one embodiment, as shown in fig. 6, the above step S4 includes steps S41 to S45, wherein:
step S41, constructing a three-dimensional point cascade graph based on the target access sequence and the second configuration list; the three-dimensional point cascade graph comprises a plurality of cascade three-dimensional point layers and a plurality of vertexes corresponding to each three-dimensional point layer, wherein each three-dimensional point layer corresponds to one three-dimensional point, and the vertexes represent a plurality of groups of mechanical arm joint corner data corresponding to the three-dimensional points.
It should be noted that the multiple vertexes corresponding to each three-dimensional point layer represent multiple sets of robot arm joint rotation angle data corresponding to each three-dimensional point of the robot arm.
Step S42, traversing each three-dimensional point layer in the three-dimensional point cascade graph, respectively selecting a vertex in two adjacent three-dimensional point layers, and acquiring a moving path and a moving cost of the mechanical arm between the two adjacent three-dimensional point layers based on the two selected vertices.
And step S43, repeating the previous step until all vertexes in the three-dimensional point cascade graph are traversed, and acquiring all movement paths and movement costs finally.
And step S44, traversing each three-dimensional point layer in the three-dimensional point cascade graph, and screening a target moving path from a plurality of moving paths corresponding to two adjacent three-dimensional point layers based on the moving cost to obtain a plurality of target moving paths.
Preferably, a moving path with the minimum moving cost is screened out from a plurality of moving paths corresponding to two adjacent three-dimensional point layers to be used as a target moving path, so that the implantation cost of the brain-computer interface implantation when the mechanical arm moves in the three-dimensional head region can be reduced.
In step S45, a target configuration list is obtained based on the plurality of target movement paths and the second configuration list, and a simulated implantation trajectory formed by the robot arm in the three-dimensional head region is obtained based on the target configuration list.
The target configuration list comprises a plurality of three-dimensional points arranged according to a target access sequence and mechanical arm joint corner data corresponding to each three-dimensional point.
Further, the simulated implantation trajectory formed by the robotic arm in the three-dimensional head region may be represented by the following equation (4):
Figure 614186DEST_PATH_IMAGE021
wherein,
Figure 734588DEST_PATH_IMAGE022
a simulated implantation trajectory is represented that is,
Figure 983167DEST_PATH_IMAGE023
a three-dimensional point of origin is represented,
Figure 96485DEST_PATH_IMAGE024
a three-dimensional point of the end point is represented,
Figure 114120DEST_PATH_IMAGE025
velocity data representing other three-dimensional points between a starting three-dimensional point and an ending three-dimensional pointThe velocity data includes acceleration and velocity of other three-dimensional points. K represents the number of other three-dimensional points.
Preferably, the simulated implantation trajectory formed by the mechanical arm in the three-dimensional head region is generated by using an open-source robot motion planning algorithm and a target configuration list. The Open source robot Motion Planning algorithm is an OMPL algorithm (The Open Motion Planning Library, OMPL).
In one embodiment, fig. 7 is a schematic structural diagram of a three-dimensional point cascade diagram in an embodiment of the present invention, and as shown in fig. 7, the three-dimensional point cascade diagram includes a plurality of cascaded three-dimensional point layers and a plurality of vertices corresponding to each three-dimensional point layer. The three-dimensional point layer is composed of a plurality of vertexes which are longitudinally arranged, the number of the three-dimensional point layer is [1, n ], each circle in fig. 7 represents a vertex, a black solid circle on the left side in fig. 7 represents a starting vertex, and a black solid circle on the right side in fig. 7 represents an ending vertex. And a line between two adjacent vertexes represents a moving path between two adjacent three-dimensional point layers corresponding to the vertexes. For example, the three-dimensional dot layer 1 and the three-dimensional dot layer 2 are two adjacent three-dimensional dot layers.
In one embodiment, as shown in fig. 8, the step S42 includes steps S421 to S424, where:
step S421, the mechanical arm joint corner data corresponding to the two selected vertices and the maximum corner angular velocity of the mechanical arm joint are obtained.
Step S422, acquiring a mechanical arm joint rotation angle difference value based on the mechanical arm joint rotation angle data corresponding to the two vertexes, and acquiring maximum joint rotation angle time based on the mechanical arm joint rotation angle difference value and the maximum rotation angle speed.
The mechanical arm joint corner data comprises a plurality of mechanical arm joints and a joint corner corresponding to each mechanical arm joint. A plurality of mechanical arm joints are numbered by joint
Figure 405424DEST_PATH_IMAGE026
A distinction is made. For example, if the number of robot joints is six, then
Figure 141299DEST_PATH_IMAGE027
Has a value of [1,6]。
Step 423, acquiring corner symbol switching cost of the mechanical arm joint based on the mechanical arm joint corner data corresponding to the two vertexes; and acquiring the extra cost of the mechanical arm moving between two adjacent three-dimensional point layers based on the corner symbol switching cost and the preset extra cost coefficient.
Step S424, obtaining a movement cost of the robot arm moving between two adjacent three-dimensional point layers based on the maximum joint corner time and the additional cost.
In one embodiment, the mechanical arm joints corresponding to two vertexes
Figure 792729DEST_PATH_IMAGE027
Based on mechanical arm joints
Figure 664870DEST_PATH_IMAGE028
The corresponding difference of the joint rotation angles of the mechanical arm is calculated. Based on arm joint
Figure 392655DEST_PATH_IMAGE029
And calculating the maximum corner angular speed and the corresponding joint corner difference value of the mechanical arm to obtain the corresponding maximum joint corner time. Based on arm joint
Figure 599514DEST_PATH_IMAGE029
The corresponding corner symbol switching cost is calculated according to the joint corner, and the joint is based on the mechanical arm joint
Figure 70946DEST_PATH_IMAGE030
Corresponding corner symbol switching cost and preset extra cost coefficient are obtained, and the mechanical arm joint is obtained
Figure 797594DEST_PATH_IMAGE028
The additional cost of moving between two vertices in two adjacent three-dimensional point layers. Based on arm joint
Figure 430701DEST_PATH_IMAGE028
Calculating the corresponding maximum joint corner time and the extra cost to obtain the mechanical arm joint
Figure 124856DEST_PATH_IMAGE031
A movement cost of moving between two vertices in two adjacent three-dimensional point layers. Wherein, the mechanical arm joint
Figure 134400DEST_PATH_IMAGE027
Showing any one of the robot joints.
Further, the moving cost of the robot arm moving between two adjacent three-dimensional point layers is calculated as shown in the following formula (5):
Figure 981134DEST_PATH_IMAGE032
where C represents a predetermined extra cost coefficient, which is a constant.
Figure 34409DEST_PATH_IMAGE033
The joint number of the robot joint is indicated.
Figure 966593DEST_PATH_IMAGE034
Mechanical arm joint representing vertex correspondence in previous three-dimensional point layer
Figure 779828DEST_PATH_IMAGE035
Is rotated by the first joint angle of (a),
Figure 746647DEST_PATH_IMAGE036
representing mechanical arm joint corresponding to vertex in the next three-dimensional point layer
Figure 705245DEST_PATH_IMAGE037
A second articulation angle of (a).
Figure 390304DEST_PATH_IMAGE038
Representing mechanical arm joint corresponding to vertex in two adjacent three-dimensional point layers
Figure 741651DEST_PATH_IMAGE029
The difference of the rotation angles of the joints of the mechanical arms.
Figure 812244DEST_PATH_IMAGE039
Indicating joints of robot arms
Figure 692475DEST_PATH_IMAGE040
The maximum angular velocity of the rotation angle of the motor,
Figure 599252DEST_PATH_IMAGE041
indicating joints of robot arms
Figure 737978DEST_PATH_IMAGE042
The maximum joint rotation angle time.
Figure 413810DEST_PATH_IMAGE043
The function of the symbol is represented by,
Figure 996101DEST_PATH_IMAGE044
indicating mechanical arm joint in mechanical arm
Figure 124594DEST_PATH_IMAGE040
Corner symbol switching costs for moving between two adjacent three-dimensional dot layers.
In the arm joint, the arm joint is provided
Figure 67011DEST_PATH_IMAGE045
When the joint angle of (1) is turned from a negative angle to a positive angle or from a negative angle to a positive angle, the angle sign switching cost is 1. At mechanical arm joint
Figure 597349DEST_PATH_IMAGE046
When the joint angle of (a) is changed from a negative angle to a negative angle or from a positive angle to a positive angle, the angle sign change cost is 0. Namely the mechanical arm joint corresponding to the top point in two adjacent three-dimensional point layers
Figure 350542DEST_PATH_IMAGE042
With different corner signs, the movement cost of the robotic arm from between two adjacent three-dimensional point layers is higher.
The following provides a specific embodiment to further explain the mechanical arm trajectory planning method based on the brain-computer interface, which specifically includes the following steps:
step 1: acquiring mechanical arm pose data of the mechanical arm at each three-dimensional point in the three-dimensional head area, wherein the mechanical arm pose data comprise three-dimensional coordinate values and coordinate axis rotation angles of the mechanical arm; converting the pose data of the mechanical arm into mechanical arm joint corner data based on a kinematics inverse solution operation strategy, wherein the mechanical arm joint corner data comprises a plurality of mechanical arm joints and corners of each mechanical arm joint; and obtaining a first configuration list based on each three-dimensional point in the three-dimensional head area and the mechanical arm joint corner data corresponding to each three-dimensional point.
Step 2: acquiring a first bounding box corresponding to each three-dimensional point of the mechanical arm in a first configuration list and a second bounding box corresponding to a three-dimensional head area; for each first bounding box, judging whether the first bounding box intersects with the second bounding box; under the condition that the first enclosure box is intersected with the second enclosure box, judging whether the mechanical arm is intersected with the three-dimensional head area at a three-dimensional point corresponding to the first enclosure box; and under the condition that the three-dimensional points corresponding to the first enclosure box of the mechanical arm are intersected with the three-dimensional head area, deleting the three-dimensional points and the corresponding mechanical arm joint corner data in the first configuration list. And taking the first configuration list after the deletion processing as a second configuration list.
And step 3: acquiring the current iteration count and the current access sequence of the mechanical arm to all three-dimensional points in the second configuration list; acquiring a current access path corresponding to the current access sequence based on the current access sequence and the three-dimensional coordinates of each three-dimensional point in the second configuration list; acquiring a local access sequence between any two nonadjacent three-dimensional points in the current access sequence, and turning the local access sequence in the current access sequence to obtain a first access sequence; acquiring a first access path corresponding to the first access sequence based on the first access sequence and the three-dimensional coordinates of each three-dimensional point in the second configuration list; updating the current access sequence and the current iteration count based on the current access path and the first access path; taking the updated current access sequence as a new current access sequence, and taking the updated current iteration count as a new current iteration count; and repeatedly executing the steps until the current iteration count reaches the maximum iteration number, and taking the finally obtained current access sequence as a target access sequence.
And 4, step 4: constructing a three-dimensional point cascade graph based on the target access sequence and the second configuration list; the three-dimensional point cascade graph comprises a plurality of cascade three-dimensional point layers and a plurality of vertexes corresponding to each three-dimensional point layer, wherein each three-dimensional point layer corresponds to one three-dimensional point, and the vertexes represent a plurality of groups of mechanical arm joint corner data corresponding to the three-dimensional points; traversing each three-dimensional point layer in the three-dimensional point cascade graph, respectively selecting a vertex in two adjacent three-dimensional point layers, and acquiring a moving path and a moving cost of the mechanical arm moving between the two adjacent three-dimensional point layers based on the two selected vertices; repeatedly executing the previous step until all vertexes in the three-dimensional point cascade graph are traversed, and finally obtaining all moving paths and moving costs; traversing each three-dimensional point layer in the three-dimensional point cascade graph, and screening a target moving path from a plurality of moving paths corresponding to two adjacent three-dimensional point layers based on the moving cost to obtain a plurality of target moving paths; and acquiring a target configuration list based on the plurality of target moving paths and the second configuration list, and acquiring a simulated implantation track formed by the mechanical arm in the three-dimensional head area based on the target configuration list.
And 5: acquiring mechanical arm joint corner data corresponding to the two selected vertexes and the maximum corner angular speed of the mechanical arm joint; acquiring a mechanical arm joint corner difference value based on mechanical arm joint corner data corresponding to the two vertexes, and acquiring maximum joint corner time based on the mechanical arm joint corner difference value and the maximum corner angular speed; acquiring corner symbol switching cost of the mechanical arm joint based on the mechanical arm joint corner data corresponding to the two vertexes; acquiring the extra cost of the mechanical arm moving between two adjacent three-dimensional point layers based on the corner symbol switching cost and a preset extra cost coefficient; and acquiring the movement cost of the mechanical arm moving between two adjacent three-dimensional point layers based on the maximum joint corner time and the additional cost.
The mechanical arm trajectory planning device based on the brain-computer interface provided by the invention is described below, and the mechanical arm trajectory planning device based on the brain-computer interface described below and the mechanical arm trajectory planning method based on the brain-computer interface described above can be referred to correspondingly.
As shown in fig. 9, the present invention provides a robot path planning apparatus based on a brain-computer interface, wherein the robot path planning apparatus 100 based on the brain-computer interface includes: the configuration acquiring module 10 is configured to acquire a first configuration list, where the first configuration list includes each three-dimensional point in the three-dimensional head region and robot arm joint rotation angle data of the robot arm at each three-dimensional point in the three-dimensional head region. And the collision detection module 20 is configured to perform collision detection based on the three-dimensional head region and the first configuration list, and delete a three-dimensional point where the mechanical arm collides with the three-dimensional head region and mechanical arm joint corner data corresponding to the three-dimensional point in the first configuration list based on a collision detection result. And the order determining module 30 is configured to use the deleted first configuration list as a second configuration list, and obtain a target access order of the robot to all three-dimensional points in the second configuration list. And the track generation module 40 is configured to obtain a simulated implantation track formed by the movement of the mechanical arm in the three-dimensional head region based on the second configuration list and the target access sequence, where the simulated implantation track is used to implant the brain-computer interface into the three-dimensional head region.
In one embodiment, the configuration acquisition module 10 includes: and the pose data acquisition unit is used for acquiring the pose data of the mechanical arm at each three-dimensional point in the three-dimensional head area, and the pose data of the mechanical arm comprises a three-dimensional coordinate value and a coordinate axis rotation angle of the mechanical arm. And the corner data acquisition unit is used for converting the mechanical arm pose data into mechanical arm joint corner data based on a kinematics inverse solution operation strategy, and the mechanical arm joint corner data comprises a plurality of mechanical arm joints and corners of each mechanical arm joint. And the configuration list acquisition unit is used for acquiring a first configuration list based on each three-dimensional point in the three-dimensional head area and the mechanical arm joint corner data corresponding to each three-dimensional point.
In one embodiment, the collision detection module 20 includes: and the bounding box acquisition unit is used for acquiring a first bounding box corresponding to each three-dimensional point in the first configuration list and a second bounding box corresponding to the three-dimensional head area of the mechanical arm. And the first intersection judging unit is used for judging whether the first bounding box intersects with the second bounding box or not aiming at each first bounding box. And the second intersection judging unit is used for judging whether the mechanical arm intersects with the three-dimensional head area at the three-dimensional point corresponding to the first enclosure box under the condition that the first enclosure box intersects with the second enclosure box. And the three-dimensional point deleting unit is used for deleting the three-dimensional points and the corresponding mechanical arm joint corner data in the first configuration list under the condition that the mechanical arm intersects with the three-dimensional head area at the three-dimensional points corresponding to the first enclosure box.
In one embodiment, the bounding box acquisition unit includes: the system comprises a coordinate extreme value acquisition subunit, a first configuration list and a second configuration list, wherein the coordinate extreme value acquisition subunit is used for acquiring mechanical arm coordinate extreme value data of each three-dimensional point of a mechanical arm in the first configuration list, and the mechanical arm coordinate extreme value data comprises a plurality of mechanical arm joints of the mechanical arm and coordinate extreme value data of each mechanical arm joint; and the first bounding box acquisition subunit is used for acquiring a first bounding box corresponding to each mechanical arm joint in the mechanical arm at each three-dimensional point in the first configuration list based on the mechanical arm coordinate extreme value data. And the second bounding box acquiring subunit is used for acquiring the area coordinate extreme value data of the three-dimensional head area and acquiring a second bounding box corresponding to the three-dimensional head area based on the area coordinate extreme value data.
In one embodiment, the order determination module 30 includes: and the iteration data acquisition unit is used for acquiring the current iteration count and the current access sequence of the mechanical arm to all three-dimensional points in the second configuration list. And the first path acquisition unit is used for acquiring a current access path corresponding to the current access sequence based on the current access sequence and the three-dimensional coordinates of each three-dimensional point in the second configuration list. And the local sequence turning unit is used for acquiring a local access sequence between any two nonadjacent three-dimensional points in the current access sequence and turning the local access sequence in the current access sequence to obtain a first access sequence. And the second path acquisition unit is used for acquiring a first access path corresponding to the first access sequence based on the first access sequence and the three-dimensional coordinates of each three-dimensional point in the second configuration list. And the iteration data updating unit is used for updating the current access sequence and the current iteration count based on the current access path and the first access path. And the iteration data determining unit is used for taking the updated current access sequence as a new current access sequence and taking the updated current iteration count as a new current iteration count. And the target sequence determining unit is used for repeatedly executing the steps until the current iteration count reaches the maximum iteration number, and taking the finally obtained current access sequence as the target access sequence.
In one embodiment, the trajectory generation module includes: the cascade graph building unit is used for building a three-dimensional point cascade graph based on the target access sequence and the second configuration list; the three-dimensional point cascade graph comprises a plurality of cascade three-dimensional point layers and a plurality of vertexes corresponding to each three-dimensional point layer, wherein each three-dimensional point layer corresponds to one three-dimensional point, and the vertexes represent a plurality of groups of mechanical arm joint corner data corresponding to the three-dimensional points. The first mobile calculation unit is used for traversing each three-dimensional point layer in the three-dimensional point cascade graph, respectively selecting a vertex in two adjacent three-dimensional point layers, and acquiring a moving path and a moving cost of the mechanical arm moving between the two adjacent three-dimensional point layers based on the two selected vertices. And the second mobile calculation unit is used for repeatedly executing the previous step until all vertexes in the three-dimensional point cascade graph are traversed, and all mobile paths and mobile costs are obtained finally. And the moving path screening unit is used for traversing each three-dimensional point layer in the three-dimensional point cascade graph, screening a target moving path from a plurality of moving paths corresponding to two adjacent three-dimensional point layers based on the moving cost, and obtaining a plurality of target moving paths. And the simulated track generating unit is used for acquiring a target configuration list based on the plurality of target moving paths and the second configuration list and acquiring a simulated implantation track formed in the three-dimensional head area by the mechanical arm based on the target configuration list.
In one embodiment, a first mobile computing unit includes: and the joint data acquisition subunit is used for acquiring the mechanical arm joint corner data corresponding to the two selected vertexes and the maximum corner angular speed of the mechanical arm joint. And the corner time acquisition subunit is used for acquiring a mechanical arm joint corner difference value based on the mechanical arm joint corner data corresponding to the two vertexes and acquiring the maximum joint corner time based on the mechanical arm joint corner difference value and the maximum corner angular speed. The extra cost obtaining subunit is used for obtaining corner symbol switching cost of the mechanical arm joint based on the mechanical arm joint corner data corresponding to the two vertexes; and acquiring the extra cost of the mechanical arm moving between two adjacent three-dimensional point layers based on the corner symbol switching cost and the preset extra cost coefficient. And the movement cost acquisition subunit is used for acquiring the movement cost of the mechanical arm moving between two adjacent three-dimensional point layers based on the maximum joint corner time and the additional cost.
Fig. 10 illustrates a physical structure diagram of an electronic device, and as shown in fig. 10, the electronic device may include: a processor (processor)1010, a communication Interface (Communications Interface)1020, a memory (memory)1030, and a communication bus 1040, wherein the processor 1010, the communication Interface 1020, and the memory 1030 are in communication with each other via the communication bus 1040. The processor 1010 may invoke logic instructions in the memory 1030 to perform a brain-computer interface based method of robotic arm trajectory planning, the method comprising: acquiring a first configuration list, wherein the first configuration list comprises each three-dimensional point in the three-dimensional head area and mechanical arm joint corner data of the mechanical arm at each three-dimensional point in the three-dimensional head area; performing collision detection based on the three-dimensional head area and the first configuration list, and deleting three-dimensional points where the mechanical arm collides with the three-dimensional head area and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list based on a collision detection result; taking the deleted first configuration list as a second configuration list, and acquiring a target access sequence of the mechanical arm to all three-dimensional points in the second configuration list; and acquiring a simulated implantation track formed by the movement of the mechanical arm in the three-dimensional head region based on the second configuration list and the target access sequence, wherein the simulated implantation track is used for implanting the brain-computer interface into the three-dimensional head region.
Furthermore, the logic instructions in the memory 1030 can be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for brain-based interface-based mechanical arm trajectory planning provided by the above methods, the method comprising: acquiring a first configuration list, wherein the first configuration list comprises each three-dimensional point in the three-dimensional head area and mechanical arm joint corner data of the mechanical arm at each three-dimensional point in the three-dimensional head area; performing collision detection based on the three-dimensional head area and the first configuration list, and deleting three-dimensional points where the mechanical arm collides with the three-dimensional head area and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list based on a collision detection result; taking the deleted first configuration list as a second configuration list, and acquiring a target access sequence of the mechanical arm to all three-dimensional points in the second configuration list; and acquiring a simulated implantation track formed by the movement of the mechanical arm in the three-dimensional head region based on the second configuration list and the target access sequence, wherein the simulated implantation track is used for implanting the brain-computer interface into the three-dimensional head region.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on the understanding, the above technical solutions substantially or otherwise contributing to the prior art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A mechanical arm track planning method based on a brain-computer interface is characterized by comprising the following steps:
acquiring a first configuration list, wherein the first configuration list comprises each three-dimensional point in a three-dimensional head area and mechanical arm joint corner data of a mechanical arm at each three-dimensional point in the three-dimensional head area;
performing collision detection based on the three-dimensional head area and the first configuration list, and deleting three-dimensional points where the mechanical arm collides with the three-dimensional head area and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list based on a collision detection result;
taking the deleted first configuration list as a second configuration list, and acquiring a target access sequence of the mechanical arm to all three-dimensional points in the second configuration list;
and acquiring a simulated implantation track formed by the movement of the mechanical arm in the three-dimensional head region based on the second configuration list and the target access sequence, wherein the simulated implantation track is used for implanting a brain-computer interface into the three-dimensional head region.
2. The brain-computer interface based mechanical arm trajectory planning method according to claim 1, wherein the obtaining a first configuration list comprises:
acquiring mechanical arm position and pose data of the mechanical arm at each three-dimensional point in the three-dimensional head area, wherein the mechanical arm position and pose data comprise three-dimensional coordinate values and coordinate axis rotation angles of the mechanical arm;
converting the mechanical arm pose data into mechanical arm joint corner data based on a kinematics inverse solution operation strategy, wherein the mechanical arm joint corner data comprises a plurality of mechanical arm joints and corners of each mechanical arm joint;
and obtaining the first configuration list based on each three-dimensional point in the three-dimensional head area and the mechanical arm joint corner data corresponding to each three-dimensional point.
3. The brain-computer interface-based mechanical arm trajectory planning method according to claim 1 or 2, wherein the performing collision detection based on the three-dimensional head region and the first configuration list, and deleting three-dimensional points where a mechanical arm collides with the three-dimensional head region and mechanical arm joint rotation angle data corresponding to the three-dimensional points in the first configuration list based on a collision detection result comprises:
acquiring a first bounding box corresponding to each three-dimensional point in the first configuration list and a second bounding box corresponding to the three-dimensional head region of the mechanical arm;
for each of the first bounding boxes, determining whether the first bounding box intersects the second bounding box;
under the condition that the first enclosure box is intersected with the second enclosure box, judging whether a mechanical arm is intersected with the three-dimensional head area at a three-dimensional point corresponding to the first enclosure box;
and under the condition that the three-dimensional points corresponding to the first enclosure box of the mechanical arm are intersected with the three-dimensional head area, deleting the three-dimensional points and the corresponding mechanical arm joint rotation angle data in the first configuration list.
4. The brain-computer interface based mechanical arm trajectory planning method according to claim 3, wherein the obtaining a first bounding box corresponding to the mechanical arm at each three-dimensional point in the first configuration list and a second bounding box corresponding to the three-dimensional head region comprises:
acquiring mechanical arm coordinate extreme value data of the mechanical arm at each three-dimensional point in the first configuration list, wherein the mechanical arm coordinate extreme value data comprises a plurality of mechanical arm joints of the mechanical arm and coordinate extreme value data of each mechanical arm joint;
acquiring a first enclosure box corresponding to each mechanical arm joint in the mechanical arm at each three-dimensional point in the first configuration list based on the mechanical arm coordinate extreme value data;
and acquiring the region coordinate extreme value data of the three-dimensional head region, and acquiring a second enclosure box corresponding to the three-dimensional head region based on the region coordinate extreme value data.
5. The brain-computer interface based mechanical arm trajectory planning method according to claim 1 or 2, wherein the obtaining of the target access order of the mechanical arm to all three-dimensional points in the second configuration list comprises:
acquiring a current iteration count and a current access sequence of the mechanical arm to all three-dimensional points in the second configuration list;
acquiring a current access path corresponding to the current access sequence based on the current access sequence and the three-dimensional coordinates of each three-dimensional point in the second configuration list;
acquiring a local access sequence between any two non-adjacent three-dimensional points in the current access sequence, and turning over the local access sequence in the current access sequence to obtain a first access sequence;
acquiring a first access path corresponding to the first access sequence based on the first access sequence and the three-dimensional coordinates of each three-dimensional point in the second configuration list;
updating the current access order and the current iteration count based on the current access path and the first access path;
taking the updated current access sequence as a new current access sequence, and taking the updated current iteration count as a new current iteration count;
and repeatedly executing the steps until the current iteration count reaches the maximum iteration number, and taking the finally obtained current access sequence as the target access sequence.
6. The brain-computer interface-based mechanical arm trajectory planning method according to claim 1 or 2, wherein the obtaining of the simulated implantation trajectory formed by the movement of the mechanical arm in the three-dimensional head region based on the second configuration list and the target access sequence comprises:
constructing a three-dimensional point cascade graph based on the target access sequence and the second configuration list; the three-dimensional point cascade graph comprises a plurality of cascade three-dimensional point layers and a plurality of vertexes corresponding to each three-dimensional point layer, wherein each three-dimensional point layer corresponds to one three-dimensional point, and the vertexes represent a plurality of groups of mechanical arm joint corner data corresponding to the three-dimensional points;
traversing each three-dimensional point layer in the three-dimensional point cascade graph, respectively selecting a vertex in two adjacent three-dimensional point layers, and acquiring a moving path and a moving cost of the mechanical arm moving between the two adjacent three-dimensional point layers based on the two selected vertices;
repeatedly executing the previous step until all vertexes in the three-dimensional point cascade graph are traversed, and finally obtaining all moving paths and the moving cost;
traversing each three-dimensional point layer in the three-dimensional point cascade graph, and screening a target moving path from a plurality of moving paths corresponding to two adjacent three-dimensional point layers based on the moving cost to obtain a plurality of target moving paths;
and acquiring a target configuration list based on a plurality of target moving paths and the second configuration list, and acquiring a simulated implantation track formed by the mechanical arm in the three-dimensional head area based on the target configuration list.
7. The brain-computer interface-based mechanical arm trajectory planning method according to claim 6, wherein the obtaining of the movement path and the movement cost of the mechanical arm between the two adjacent three-dimensional point layers based on the two selected vertices comprises:
acquiring mechanical arm joint corner data corresponding to the two selected vertexes and the maximum corner angular speed of the mechanical arm joint;
acquiring a mechanical arm joint corner difference value based on mechanical arm joint corner data corresponding to the two vertexes, and acquiring maximum joint corner time based on the mechanical arm joint corner difference value and the maximum corner angular speed;
acquiring corner symbol switching cost of the mechanical arm joint based on the mechanical arm joint corner data corresponding to the two vertexes; acquiring the extra cost of the mechanical arm moving between the two adjacent three-dimensional point layers based on the corner symbol switching cost and a preset extra cost coefficient;
and acquiring the movement cost of the mechanical arm moving between the two adjacent three-dimensional point layers based on the maximum joint corner time and the additional cost.
8. A mechanical arm track planning device based on a brain-computer interface is characterized by comprising:
the configuration acquisition module is used for acquiring a first configuration list, wherein the first configuration list comprises each three-dimensional point in a three-dimensional head area and mechanical arm joint corner data of a mechanical arm at each three-dimensional point in the three-dimensional head area;
the collision detection module is used for performing collision detection based on the three-dimensional head area and the first configuration list, and deleting three-dimensional points where the mechanical arm collides with the three-dimensional head area and mechanical arm joint corner data corresponding to the three-dimensional points in the first configuration list based on a collision detection result;
the sequence determining module is used for taking the deleted first configuration list as a second configuration list and acquiring the target access sequence of the mechanical arm to all three-dimensional points in the second configuration list;
and the track generation module is used for acquiring a simulated implantation track formed by the movement of the mechanical arm in the three-dimensional head area based on the second configuration list and the target access sequence, wherein the simulated implantation track is used for implanting a brain-computer interface into the three-dimensional head area.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the brain-computer interface based robotic arm trajectory planning method of any one of claims 1 to 7.
10. A non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the brain-computer interface based mechanical arm trajectory planning method according to any one of claims 1 to 7.
CN202210941922.7A 2022-08-08 2022-08-08 Mechanical arm track planning method and device based on brain-computer interface and electronic equipment Active CN114986524B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210941922.7A CN114986524B (en) 2022-08-08 2022-08-08 Mechanical arm track planning method and device based on brain-computer interface and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210941922.7A CN114986524B (en) 2022-08-08 2022-08-08 Mechanical arm track planning method and device based on brain-computer interface and electronic equipment

Publications (2)

Publication Number Publication Date
CN114986524A true CN114986524A (en) 2022-09-02
CN114986524B CN114986524B (en) 2022-10-28

Family

ID=83023070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210941922.7A Active CN114986524B (en) 2022-08-08 2022-08-08 Mechanical arm track planning method and device based on brain-computer interface and electronic equipment

Country Status (1)

Country Link
CN (1) CN114986524B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116901074A (en) * 2023-08-03 2023-10-20 南京云创大数据科技股份有限公司 Mechanical arm track planning method and device, storage medium and electronic equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106166750A (en) * 2016-09-27 2016-11-30 北京邮电大学 A kind of modified model D* mechanical arm dynamic obstacle avoidance paths planning method
CN107803831A (en) * 2017-09-27 2018-03-16 杭州新松机器人自动化有限公司 A kind of AOAAE bounding volume hierarchy (BVH)s collision checking method
CN110488810A (en) * 2019-07-22 2019-11-22 华南理工大学 Welding robot optimum path planning method based on improved Particle Swarm Algorithm
CN110509279A (en) * 2019-09-06 2019-11-29 北京工业大学 A kind of trajectory path planning method and system of apery mechanical arm
CN113232021A (en) * 2021-05-19 2021-08-10 中国科学院自动化研究所苏州研究院 Mechanical arm grabbing path collision detection method
CN113246143A (en) * 2021-06-25 2021-08-13 视比特(长沙)机器人科技有限公司 Mechanical arm dynamic obstacle avoidance trajectory planning method and device
US20210278857A1 (en) * 2020-03-06 2021-09-09 Edda Technology, Inc. Method and system for obstacle avoidance in robot path planning using depth sensors
CN113693725A (en) * 2021-10-22 2021-11-26 杭州维纳安可医疗科技有限责任公司 Needle insertion path planning method, device, equipment and storage medium
CN114376726A (en) * 2022-02-08 2022-04-22 西安科悦医疗股份有限公司 Path planning method and related device for transcranial magnetic stimulation navigation process
CN114564008A (en) * 2022-01-19 2022-05-31 南京邮电大学 Mobile robot path planning method based on improved A-Star algorithm
CN114633258A (en) * 2022-04-24 2022-06-17 中国铁建重工集团股份有限公司 Method for planning mechanical arm movement track in tunnel environment and related device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106166750A (en) * 2016-09-27 2016-11-30 北京邮电大学 A kind of modified model D* mechanical arm dynamic obstacle avoidance paths planning method
CN107803831A (en) * 2017-09-27 2018-03-16 杭州新松机器人自动化有限公司 A kind of AOAAE bounding volume hierarchy (BVH)s collision checking method
CN110488810A (en) * 2019-07-22 2019-11-22 华南理工大学 Welding robot optimum path planning method based on improved Particle Swarm Algorithm
CN110509279A (en) * 2019-09-06 2019-11-29 北京工业大学 A kind of trajectory path planning method and system of apery mechanical arm
US20210278857A1 (en) * 2020-03-06 2021-09-09 Edda Technology, Inc. Method and system for obstacle avoidance in robot path planning using depth sensors
CN113232021A (en) * 2021-05-19 2021-08-10 中国科学院自动化研究所苏州研究院 Mechanical arm grabbing path collision detection method
CN113246143A (en) * 2021-06-25 2021-08-13 视比特(长沙)机器人科技有限公司 Mechanical arm dynamic obstacle avoidance trajectory planning method and device
CN113693725A (en) * 2021-10-22 2021-11-26 杭州维纳安可医疗科技有限责任公司 Needle insertion path planning method, device, equipment and storage medium
CN114564008A (en) * 2022-01-19 2022-05-31 南京邮电大学 Mobile robot path planning method based on improved A-Star algorithm
CN114376726A (en) * 2022-02-08 2022-04-22 西安科悦医疗股份有限公司 Path planning method and related device for transcranial magnetic stimulation navigation process
CN114633258A (en) * 2022-04-24 2022-06-17 中国铁建重工集团股份有限公司 Method for planning mechanical arm movement track in tunnel environment and related device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黎宇晨等: "狭小空间机械臂自适应轨迹规划研究", 《电子元器件与信息技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116901074A (en) * 2023-08-03 2023-10-20 南京云创大数据科技股份有限公司 Mechanical arm track planning method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN114986524B (en) 2022-10-28

Similar Documents

Publication Publication Date Title
CN108645411B (en) Robot path planning method and device based on particle swarm algorithm and terminal equipment
CN111402290B (en) Action restoration method and device based on skeleton key points
CN108983978B (en) Virtual hand control method and device
US5056031A (en) Apparatus for detecting the collision of moving objects
US20180036882A1 (en) Layout setting method and layout setting apparatus
Aristidou et al. Real-time marker prediction and CoR estimation in optical motion capture
Sundaralingam et al. Geometric in-hand regrasp planning: Alternating optimization of finger gaits and in-grasp manipulation
Lau et al. Precomputed search trees: Planning for interactive goal-driven animation
Ren et al. A potential field model using generalized sigmoid functions
CN109760040B (en) Interference determination method, interference determination system, and storage medium
CN114986524B (en) Mechanical arm track planning method and device based on brain-computer interface and electronic equipment
JP4267508B2 (en) Optimization of ergonomic movement of virtual dummy
CN114564009A (en) Surgical robot path planning method and system
JP2826138B2 (en) Mobile body interference check device
CN113119104B (en) Mechanical arm control method, mechanical arm control device, computing equipment and system
Mirolo et al. A solid modelling system for robot action planning
Zhao et al. Bi-criteria acceleration level obstacle avoidance of redundant manipulator
Wagner et al. Collision detection and tissue modeling in a vr-simulator for eye surgery
Vlasov et al. Haptic rendering of volume data with collision determination guarantee using ray casting and implicit surface representation
CN114820802A (en) High-freedom-degree dexterous hand grabbing planning method and device and computer equipment
KR101105244B1 (en) Apparatus and method for modeling curved surface using intersection points in three-dimensional grid structure
CN112276947B (en) Robot motion simulation method, device, equipment and storage medium
Berseth et al. ACCLMesh: Curvature-based navigation mesh generation
Edelkamp et al. Surface inspection via hitting sets and multi-goal motion planning
CN113110459A (en) Motion planning method for multi-legged robot

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant