Search

CN-116276982-B - Path planning method based on ArUco code feedback coordinates

CN116276982BCN 116276982 BCN116276982 BCN 116276982BCN-116276982-B

Abstract

The invention provides a path planning method based on ArUco code feedback coordinates, which comprises the specific steps of (1) operating a ArUco code identification database on a control end to create ArUco code ID values, (2) setting ArUco codes with different ID values on each game robot, (3) recording the game robots in real time through a hanging camera and establishing a coordinate system, (4) detecting ArUco codes on the identification game robots by the hanging camera and sending the ArUco codes to the identification database, (5) identifying 35 code angular coordinates and corresponding ID values of the ArUco codes identified by the identification database, calculating a center coordinate value, an upper center coordinate value and a lower center coordinate value of the ArUco codes by the control end according to the ArUco code angular coordinates, and (6) storing the ArUco code angular coordinates, the ID values and the center coordinate values, the upper center coordinate value and the lower center coordinate value into the identification database by the control end, and (7) controlling the game robots to move according to the ArUco codes on the game robots.

Inventors

  • MIAO WENNAN
  • LIU YANG
  • HUANG LI
  • LIU WENSHENG
  • CHEN YING
  • Ma Chongjing
  • LAI HONGMING

Assignees

  • 广州城市理工学院

Dates

Publication Date
20260505
Application Date
20230224

Claims (7)

  1. 1. A path planning method based on ArUco code feedback coordinates is used for controlling more than two game robots to move through a control end, and ArUco codes are arranged on each game robot, and is characterized by comprising the following specific steps: (1) Running ArUco code identification database on the control end to create ArUco code ID value; (2) Setting ArUco codes with different ID values on each game robot; (3) Real-time video recording is carried out on the game robot through the hanging camera, a coordinate system is established, and the hanging camera sends the coordinate system to the control end; (S11) selecting ArUco codes of the game robot on a real-time video coordinate system; (4) Detecting ArUco codes on the identification game robot by the hanging camera, and sending ArUco codes to the identification database; (S111) if the ArUco codes are not available or the ArUco codes cannot be selected on the real-time video, returning to the step (4) for resetting, otherwise, entering the step (5); (5) The coordinates of four corners of the ArUco codes and the corresponding ID values are identified by the identification database, and the control end calculates the central coordinate value, the upper central coordinate value and the lower central coordinate value of the ArUco codes according to the coordinates of the four corners of the ArUco codes; (6) The control end stores coordinates, ID values and central coordinate values of four corners of ArUco codes, upper central coordinate values and lower central coordinate values into the identification database; (S12) selecting one coordinate point or a plurality of coordinate points on a coordinate system, and generating a target point and calculating position distance information between each ArUco codes and the target point by a control end according to the positions and the sequence of the coordinate points; (S121) if a point is selected on the coordinate system, the control end generates coordinates (x 01, y 01) of the target point according to the selected point; (S122) the control end calculates the distance b of a straight line between the coordinates (Nx 1, ny 1) of the upper center point of the ArUco codes and the coordinates (x 01, y 01) of the target point according to a two-point distance calculation formula; b= ; (S123) the control end calculates the distance a between the coordinates (Nx 1, ny 1) of the upper center point of ArUco codes and the coordinates (Nx 2, ny 2) of the lower center point of ArUco codes according to a two-point distance calculation formula; a= ; The control end calculates the distance c between the coordinates (Nx 2, ny 2) of the lower center point of ArUco codes and the coordinates (x 01, y 01) of the target point according to a two-point distance calculation formula; c= ; (S124) the control end calculates an included angle alpha between a straight line between the coordinates (Nx 1, ny 1) of the upper center point of the ArUco codes and the coordinates (Nx 2, ny 2) of the lower center point of the ArUco codes and a straight line between the coordinates (Nx 1, ny 1) of the upper center point of the ArUco codes and the coordinates (x 01, y 01) of the target point according to an included angle calculation formula; cosα=(a 2 +b 2 -c 2 )/|a|*|b|; (S125) the control end calculates a direction value S of the target point at ArUco codes according to a direction calculation formula; s=(x01-Nx2)*(Ny1-Ny2)-(y01-Ny2)*(Nx1-Nx2); In the above formula, when s is smaller than 0, it indicates that the target point is located in the left direction of ArUco codes, and when s is larger than 0, it indicates that the target point is located in the right direction of ArUco codes; (S126) the control end controls and adjusts the direction and the rotation angle of the game robot according to the direction value S and the angle alpha; (S127) after the direction value S is adjusted, the control end controls the game robot to move to the coordinates (x 01, y 01) of the target point according to the distance b; (S13) the control end controls the corresponding game robot to move according to the position distance information between each ArUco codes and the target point; (S14) when the game robot is moved, repeating the steps (4) - (6) to acquire the ArUco code related information of the current position of the game robot again, then performing next movement control until all target points are moved, and then exiting.
  2. 2. The method for path planning based on ArUco-code feedback coordinates according to claim 1, wherein the step (4) specifically includes: (41) A hanging camera shoots ArUco code images; (42) Extracting ArUco code outline in ArUco code images; (43) Acquiring coordinates of four corner points of ArUco code contours in a coordinate system; (44) Identifying a ArUco code ID value corresponding to the ArUco code according to the ArUco code image; (45) And sending the four corner coordinates of ArUco codes and the corresponding ArUco code ID value to an identification database.
  3. 3. The method for planning a path based on ArUco-code feedback coordinates according to claim 1, wherein the step (5) specifically includes: (51) The identification database detects coordinates (x 1, y 1), (x 2, y 2), (x 3, y 3) and (x 4, y 4) of the four corner points of the ArUco codes on a coordinate system; (52) According to the central coordinate formula, coordinates (x 0, y 0) of a central point of ArUco codes on a coordinate system are obtained; (x0=(x1+x4)/2,y0=(y1+y4)/2); (53) According to the central coordinate formula of the step (52), the coordinates (Nx 1, ny 1) of an upper central point and the coordinates (Nx 2, ny 2) of a lower central point of ArUco codes are obtained; (Nx1=(x1+x2)/2,Ny1=(y1+y2)/2); (Nx2=(x3+x4)/2,Ny2=(y3+y4)/2); (54) The identification database stores the coordinate values obtained in step (5).
  4. 4. The method for path planning based on ArUco-code feedback coordinates according to claim 1, wherein the step (S12) specifically further comprises: (S128) if more than one point is selected on the coordinate system, the control end sequentially generates target points (x 01, y 01), (x 02, y 02), (x 03, y 03) according to the selected sequence according to the selected points (x 0n, y0 n); (S129) the control end repeats the steps (S122) - (S125) to calculate the coordinate information of the first target point (x 01, y 01) and control the game robot to move to the first target point (x 01, y 01); (S1201) after the game robot moves to the first target point (x 01, y 01), the control end re-acquires the coordinate information of ArUco codes located on the target point and repeats steps (S122) - (S125) to calculate the coordinate information between ArUco codes located on the target point and the next target point and control the game robot to move; (S1202) repeating the above steps (S129) - (S1201) until the game robot moves to the last target point.
  5. 5. The method of claim 1, wherein the step (S11) comprises sequentially performing the steps (S12) - (S14) according to the selected sequence if the ArUco codes of the game robot are more than one.
  6. 6. The method for planning a path based on ArUco-code feedback coordinates of claim 1, wherein the control end is a PC-end upper computer, and the game robot is electrically connected with the PC-end upper computer.
  7. 7. The method of path planning based on ArUco-code feedback coordinates of claim 1, wherein the step (3) specifically includes synchronizing live video recordings on a control terminal.

Description

Path planning method based on ArUco code feedback coordinates Technical Field The invention relates to the technical field of group control robots, in particular to a path planning method based on ArUco code feedback coordinates. Background With the rapid development of various technologies such as information technology, automation technology and intelligent hardware technology, research on intelligent robot technology is mature, research fields such as machine vision, positioning navigation and artificial intelligence are also achievements, and intelligent robots are widely applied to military, industry, daily life, entertainment and the like as comprehensive presenters in the fields. The educational robot can provide supervision education for teenagers, provide tools for parents to avoid worrying about children, and simultaneously cultivate the great interest of the children in the robot, plays an educational enlightenment role, and lays a good foundation for the future robotic business of the country. However, most of the existing educational game robots still adopt hardware control and can only control the game robots one by one, thus, the playing content is single, the interests of children are not easily cultivated, the hardware control is complex, the operation is difficult for children, and therefore, the children are difficult to obtain better playing experience, in terms of a path planning method, the existing robots such as China patent application number 201910754589.7, publication date is 2019.11.26, the method for controlling the indoor autonomous navigation of the mobile robot based on Bezier curves is disclosed, and comprises the following steps of 1) establishing a scene map, 2) determining the position of a workstation on the scene map based on ArUco codes, 3) setting target points and control points, obtaining the Bezier curves, planning the motion trail of the robot, 4) performing navigation control of the robot based on the planned motion trail of the robot, and setting meeting conditions before ArUco codes are acquired, the robot trail and the robot exit trail are added, and the navigation control method of the robot comprises angular speed control and forward and turn start and stop speed control of the robot. The method needs to identify ArUco codes stuck to a designated workstation area, then needs to control the movement of the robot based on a path planned by a Bezier curve, and the Bezier curve is relatively complex to control and has high cost. Disclosure of Invention The invention aims to provide a path planning method based on ArUco code feedback coordinates, by the planning method, coordinate points can be accurately positioned and a walking path can be planned, so that a game robot can accurately move to a target position, and the movement control can be realized only by selecting a target point, and the method is reliable and simple. In order to achieve the above purpose, a path planning method based on ArUco code feedback coordinates specifically includes the steps: (1) A ArUco code identification database is run on the control end creating ArUco code ID values. (2) ArUco codes of different ID values are set on each game robot. (3) The game robot is recorded in real time through the hanging camera, a coordinate system is established, and the hanging camera sends the coordinate system to the control end. (S11) selecting ArUco codes of the game robot on a real-time video coordinate system. (4) The hanging camera detects ArUco codes on the identification game robot and sends ArUco codes to the identification database. (S111) if the ArUco codes are not available or the ArUco codes cannot be selected on the real-time video, returning to the step (4) for resetting, otherwise, entering the step (5). (5) And the control end calculates the central coordinate value, the upper central coordinate value and the lower central coordinate value of the ArUco code according to the coordinates of the four corners of the ArUco code by identifying the coordinates of the four corners of the ArUco code and the corresponding ID value identified by the database. (6) The control end stores the coordinates of four corners of ArUco codes, ID values, center coordinate values, upper center coordinate values and lower center coordinate values into the identification database. And (S12) selecting one coordinate point or a plurality of coordinate points on a coordinate system, and generating a target point and calculating position distance information between each ArUco codes and the target point by the control end according to the positions and the sequence of the coordinate points. And (S13) the control end controls the corresponding game robot to move according to the position distance information between each ArUco codes and the target point. (S14) when the game robot is moved, repeating the steps (4) - (6) to acquire the ArUco code related information of the current position of the game robot again,