Automatic charging method for robot dog
By detecting distance and posture in real time, the robot dog is automatically aligned with the charging pile using vision and navigation equipment, which solves the problems of complexity and lack of accuracy in automatic charging in the existing technology and improves the accuracy and convenience of charging.
Patent Information
- Application Number
- CN202410698179.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2024-08-23
Smart Images

Figure CN118534906A
Abstract
Description
[0001] This application is a divisional application for the patent application with application number 202211518885.5, invention name “A method for automatic charging of a robot dog”, and application date November 30, 2022. Technical Field
[0002] The present application relates to the technical field of robot dogs, and in particular to an automatic charging method for robot dogs. Background Art
[0003] With the development of science and technology, robot dogs have gradually entered people's field of vision. Generally, when the battery of a robot dog is low, the user connects the robot dog to the charging pile to charge the robot dog. It is troublesome to charge the robot dog manually, so it is necessary to realize automatic charging of the robot dog.
[0004] In the prior art, the robot dog uses a monocular camera to identify the QR code on the charging pile, autonomously locates and navigates according to the position of the QR code, and calibrates its own posture to align with the charging pile to realize the charging function.
[0005] However, this method is limited by the QR code, which makes the automatic charging process of the robot dog complicated. Summary of the invention
[0006] The present application provides a method for automatic charging of a robot dog, and the technical solution is as follows.
[0007] In one aspect, a method for automatically charging a robot dog is provided, the method being applied to a control device, the control device being disposed on a target robot dog, the method comprising:
[0008] Real-time detection of the distance between the target robot dog and the target charging pile;
[0009] When it is detected that the distance between the target robot dog and the target charging pile is greater than a first distance threshold, controlling the target robot dog to move toward the target charging pile;
[0010] When it is detected that the distance between the target robot dog and the target charging pile is less than a first distance threshold, determining a relative posture between the target charging pile and the target robot dog;
[0011] Based on the relative position, the target robot dog is controlled to move above the target charging pile to realize charging of the target robot dog.
[0012] In another aspect, a robot dog automatic charging device is provided, the device is applied to a control device, the control device is arranged on a target robot dog, and the device comprises:
[0013] The distance detection module is used to detect the distance between the target robot dog and the target charging pile in real time;
[0014] A first moving module, configured to control the target robot dog to move toward the target charging pile when it is detected that the distance between the target robot dog and the target charging pile is greater than a first distance threshold;
[0015] A relative posture acquisition module, used to determine the relative posture between the target charging pile and the target robot dog when it is detected that the distance between the target robot dog and the target charging pile is less than a first distance threshold;
[0016] The second moving module is used to control the target robot dog to move above the target charging pile based on the relative posture to realize charging of the target robot dog.
[0017] In a possible implementation, the target robot dog is equipped with a monocular vision camera;
[0018] The real-time detection of the distance between the target robot dog and the target charging pile includes:
[0019] Acquire the target image captured by the monocular vision camera in real time;
[0020] Performing target detection on the target image through a charging pile recognition model to obtain a position of the target charging pile in the target image and a size of an image area of the target charging pile in the target image;
[0021] Determine the distance between the target robot dog and the target charging pile according to the position of the target charging pile in the target image and the size of the image area;
[0022] The controlling the target robot dog to move toward the target charging pile includes:
[0023] Based on the position of the target charging pile in the target image, determining the target orientation of the target charging pile relative to the target robot dog;
[0024] Based on the target position, the target robot dog is controlled to move toward the target charging pile.
[0025] In a possible implementation, the monocular vision camera is located on the head of the robot dog, and when the target robot dog is controlled to move toward the target charging pile, target detection is performed on the target image captured in real time by the monocular vision camera;
[0026] When it is detected that the target charging pile does not exist in the target image, the movement of the target robot dog toward the target charging pile is paused, and the forearm of the target robot dog is controlled to bend to a target angle;
[0027] When the forearm of the target robot dog is bent to a target angle and the target charging pile reappears in the target image captured by the monocular vision camera, the target robot dog is controlled to move toward the target charging pile again.
[0028] In a possible implementation, when the forearm of the target robot dog is bent at a target angle and the target charging pile does not appear in the target image captured in real time by the monocular vision camera, the target robot dog is controlled to rotate in situ and capture the surrounding environment image in real time;
[0029] When the target charging pile is detected in the surrounding environment image, the orientation of the target charging pile and the target robot dog is re-determined according to the position of the target charging pile in the surrounding environment image to control the target robot dog to move toward the target charging pile.
[0030] In a possible implementation, the target robot dog is also equipped with a wireless communication component;
[0031] When it is detected that the target charging pile does not exist in the target image, sending a positioning signal to the target charging pile through the wireless communication component;
[0032] When the location information is received, the distance information between the target charging pile and the target robot dog, and the target orientation of the target charging pile relative to the target robot dog are determined according to the location information.
[0033] In a possible implementation, the target robot dog is also provided with a depth vision camera;
[0034] The determining the relative position between the target charging pile and the target robot dog includes:
[0035] Directly below the target robot dog, with the head of the target robot dog as a reference direction, construct a first point cloud of the virtual charging pile;
[0036] Performing image segmentation on the depth image of the target charging pile to obtain a second point cloud of the target charging pile;
[0037] The first point cloud and the second point cloud are processed by the ICP algorithm to obtain the relative pose.
[0038] In a possible implementation, the target robot dog is also provided with an inertial navigation device;
[0039] Based on the relative position, controlling the target robot dog to move to above the target charging pile to charge the target robot dog includes:
[0040] Determine the world coordinates of the target robot dog based on the inertial navigation information collected by the inertial navigation device;
[0041] Based on the world coordinates of the target robot dog and the relative posture, determining the target posture information of the target charging pile in the world coordinate system;
[0042] Based on the target posture information, controlling the target robot dog to navigate to above the target charging pile;
[0043] The bending angles of the forearm and the rear arm of the target robot dog are controlled to connect the charging interface of the target robot dog to the target charging pile.
[0044] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the above-mentioned automatic charging method for a robot dog.
[0045] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned automatic charging method for a robot dog.
[0046] In another aspect, a computer program product or a computer program is provided, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned robot dog automatic charging method.
[0047] The technical solution provided by this application may have the following beneficial effects:
[0048] The control device on the target robot dog detects the distance between the target robot dog and the target charging pile in real time; when it is detected that the distance between the target robot dog and the target charging pile is greater than the first distance threshold, the target robot dog is controlled to move toward the target charging pile; when it is detected that the distance between the target robot dog and the target charging pile is less than the first distance threshold, the relative posture between the target charging pile and the target robot dog is determined; based on the relative posture, the target robot dog is controlled to move above the target charging pile to realize charging of the target robot dog. Therefore, when the above method realizes the automatic charging function of the robot dog, by real-time detection of the distance and relative posture between the target charging pile and the target robot dog, the target robot dog can be automatically aligned with the target charging pile, and the accuracy of the alignment and charging of the target robot dog and the target charging pile is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0050] Figure 1 It is a schematic structural diagram of a robot dog automatic charging system according to an exemplary embodiment.
[0051] Figure 2 The figure is a flow chart of a method for automatically charging a robot dog according to an exemplary embodiment.
[0052] Figure 3 The figure is a flow chart of a method for automatically charging a robot dog according to an exemplary embodiment.
[0053] Figure 4 A schematic diagram of target detection involved in an embodiment of the present application is shown.
[0054] Figure 5 A schematic diagram of model segmentation involved in an embodiment of the present application is shown.
[0055] Figure 6 The figure is a structural block diagram of a robot dog automatic charging device according to an exemplary embodiment.
[0056] Figure 7 It is a structural block diagram of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION
[0057] The technical solution of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0058] It should be understood that the "indication" mentioned in the embodiments of the present application can be a direct indication, an indirect indication, or an indication of an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association relationship between A and B.
[0059] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between two items, or an association relationship between the two items, or a relationship between indication and being indicated, configuration and being configured, and the like.
[0060] In an embodiment of the present application, "predefinition" may be implemented by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, including a terminal device and a network device). The present application does not limit its specific implementation method.
[0061] Figure 1 1 is a schematic diagram of a structure of a robot dog automatic charging system according to an exemplary embodiment. The robot dog automatic charging system includes a target robot dog and a target charging pile, and the target robot dog includes a data processing device 110 and a data acquisition device 120.
[0062] Optionally, the data acquisition device 120 includes a data storage device. When the data acquisition device acquires data on the distance between the target robot dog and the target charging pile and obtains the distance data between the target robot dog and the target charging pile, the distance data can be stored in the data storage device. For example, the data acquisition device may include a monocular vision camera, and the data acquisition device may also include a depth vision camera.
[0063] Optionally, the data processing device 110 may be a computer device with high computing power, for example, a control device on a target robot dog. The data processing device is used to analyze the collected distance data, orientation information, etc. between the target robot dog and the target charging pile, thereby controlling the target robot dog to move toward the target charging pile, so as to realize automatic charging of the target robot dog through the target charging pile.
[0064] Optionally, the target robot dog and the target charging pile may also be connected to each other by a wireless network (such as Bluetooth), and the distance and position relationship between the two may be determined by the communication connection.
[0065] Figure 2 is a flow chart of a method for automatically charging a robot dog according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1 The data processing device 110 shown in FIG. Figure 2 As shown, the method is applied to a control device, and the control device is arranged on a target robot dog. The method may include the following steps:
[0066] Step 201, detecting the distance between the target robot dog and the target charging pile in real time.
[0067] In actual application scenarios, when the power level of the target robot dog is less than a preset threshold or the target robot dog receives a command to charge, the automatic charging step is started. First, the distance between the target robot dog and the target charging pile needs to be obtained.
[0068] Optionally, an external sensor is installed on the target robot dog to detect the distance between the target robot dog and the target charging pile in real time. The external sensor may be a laser radar, which can detect the distance between the target charging pile and the target robot dog by measuring the flight time of the laser. The external sensor may also be a visual sensor, which may include a depth camera to obtain the depth information of the target charging pile and further obtain the distance between the target charging pile and the target robot dog. The external sensor may also be an ultrasonic sensor, which obtains the distance between the target charging pile and the target robot dog by emitting ultrasonic waves and receiving ultrasonic reflection signals.
[0069] However, in actual application scenarios, when the distance between the target charging pile and the target robot dog is far, there is a high probability that an obstacle will block the target charging pile, making it impossible for the target robot dog to directly obtain the distance between the target charging pile and the target robot dog through an external sensor. Optionally, a wireless communication component is installed on the target robot dog. When it is detected that the target charging pile does not exist in the target image, a positioning signal is sent to the target charging pile through the wireless communication component. When the position information is received, the distance information between the target charging pile and the target robot dog, as well as the target orientation of the target charging pile relative to the target robot dog, are determined based on the position information.
[0070] Step 202, when it is detected that the distance between the target robot dog and the target charging pile is greater than a first distance threshold, the target robot dog is controlled to move toward the target charging pile; when it is detected that the distance between the target robot dog and the target charging pile is less than the first distance threshold, the relative posture between the target charging pile and the target robot dog is determined.
[0071] After obtaining the distance between the target robot dog and the target charging pile, it is compared with the preset first distance threshold. When the distance is greater than the first distance threshold, that is, when the distance between the target robot dog and the target charging pile is far, the target robot dog is first controlled to move toward the target charging pile.
[0072] Optionally, the computer device first controls the forward direction of the target robot dog, and rotates the target robot dog so that the forward direction of the target robot dog faces the target charging pile.
[0073] Optionally, the distance between the target robot dog and the target charging pile is detected in real time by an external sensor in step 201, and the distance is analyzed by an algorithm in a computer device, and then the path of the target robot dog is planned and navigated, and the target robot dog is controlled to move in the direction of the target charging pile until the distance between the target robot dog and the target charging pile is less than a first distance threshold.
[0074] When the distance between the target robot dog and the target charging pile is less than the first distance threshold, that is, when the distance between the target robot dog and the target charging pile is close, the relative posture between the target charging pile and the target robot dog is detected.
[0075] Since the shape of the charging pile may not be cylindrical and is not the same in all directions, it is necessary not only to obtain the positional relationship between the target robot dog and the target charging pile, but also to obtain the posture information of the target charging pile in order to adjust the target robot dog to match it, so as to align the target robot dog with the target charging pile and charge.
[0076] Optionally, the computer device can perform target detection and posture estimation on the target charging pile through an algorithm to obtain the relative position and posture between the target charging pile and the robot dog.
[0077] Step 203: Based on the relative position, control the target robot dog to move above the target charging pile to charge the target robot dog.
[0078] Optionally, the robot dog is navigated according to the relative posture so that the target robot dog moves to dock with the target charging pile for charging.
[0079] In summary, the distance between the target robot dog and the target charging pile is detected in real time; when it is detected that the distance between the target robot dog and the target charging pile is greater than the first distance threshold, the target robot dog is controlled to move toward the target charging pile; when it is detected that the distance between the target robot dog and the target charging pile is less than the first distance threshold, the relative posture between the target charging pile and the target robot dog is determined; based on the relative posture, the target robot dog is controlled to move above the target charging pile to realize charging of the target robot dog. Therefore, when the above method realizes the automatic charging function of the robot dog, by real-time detection of the distance and relative posture between the target charging pile and the target robot dog, the target robot dog can be automatically aligned with the target charging pile, and the accuracy of the alignment and charging of the target robot dog and the target charging pile is guaranteed.
[0080] Figure 3 is a flow chart of a method for automatically charging a robot dog according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1The data processing device in the robot dog automatic charging system shown in FIG. Figure 3 As shown, the robot dog automatic charging method may include the following steps:
[0081] Step 301, detecting the distance between the target robot dog and the target charging pile in real time.
[0082] Optionally, a monocular vision camera is installed on the target robot dog, and a computer device in the target robot dog can obtain the target image captured by the monocular vision camera in real time.
[0083] Furthermore, target detection is performed on the target image through the charging pile recognition model to obtain the position of the target charging pile in the target image and the size of the image area of the target charging pile in the target image.
[0084] Optionally, the charging pile recognition model is trained by a deep learning algorithm, and by inputting the target image into the charging pile recognition model, the center point coordinates p(x0, y0) of the target charging pile (i.e., the position of the target charging pile in the target image) and the size of the recognition box (i.e., the size of the image area of the target charging pile in the target image) can be obtained. Figure 4 FIG. 2 shows a schematic diagram of target detection involved in an embodiment of the present application. Figure 4 As shown, the rectangular frame around the charging pile is the recognition frame in which the charging pile recognition model recognizes and marks the target charging pile.
[0085] Furthermore, the distance between the target robot dog and the target charging pile is determined according to the position of the target charging pile in the target image and the size of the image area.
[0086] Since the distance between the target robot dog and the target charging pile is fixed, the closer the position of the target charging pile in the target image is to the bottom, the larger the image area size of the target charging pile in the target image is; the farther the position of the target charging pile in the target image is from the bottom, the smaller the image area size of the target charging pile in the target image is. Moreover, when the position of the target charging pile in the target image is at the bottom, the closer it is to the bottom center, the larger the image area size of the target charging pile in the target image is. Therefore, the distance between the target robot dog and the target charging pile can be calculated by combining the position of the target charging pile in the target image (the center point coordinate p of the target charging pile) and the image area size (the size of the identification frame of the target charging pile).
[0087] For example, a plane rectangular coordinate system is set with the center point of the target image as the origin o(0,0), the horizontal axis x-axis is in the positive direction to the right, the vertical axis y-axis is in the positive direction downward, and the angle between the line from the origin o to the center point p of the target charging pile and the vertical axis is taken as the deviation angle θ. According to θ, the angular deviation of the target charging pile relative to the robot dog can be determined. At the same time, the relative distance between the target charging pile and the target robot dog can be determined according to the vertical axis coordinate of the center point p of the target charging pile combined with the size of the recognition frame. For example, when the deviation angle is constant, the larger the vertical axis coordinate and the larger the size of the recognition frame, the closer the target charging pile is to the target robot dog.
[0088] Step 302, when it is detected that the distance between the target robot dog and the target charging pile is greater than a first distance threshold, the target robot dog is controlled to move toward the target charging pile; when it is detected that the distance between the target robot dog and the target charging pile is less than the first distance threshold, the relative posture between the target charging pile and the target robot dog is determined.
[0089] When the target charging pile is far away from the target robot dog, the computer device first performs far-field recognition and controls the target robot dog to move toward the target charging pile.
[0090] Optionally, based on the position of the target charging pile in the target image, the target orientation of the target charging pile relative to the target robot dog is determined; based on the target orientation, the target robot dog is controlled to move toward the target charging pile.
[0091] Optionally, the computer device controls the forward direction of the target robot dog so that the target robot dog moves directly toward the charging pile, that is, the deviation angle θ=0, so that the charging pile recognition model only needs to judge the vertical axis coordinate, simplifying the movement of the target robot dog.
[0092] Optionally, the monocular vision camera is located on the head of the robot dog, and when the target robot dog is controlled to move toward the target charging pile, target detection is performed on the target image captured in real time by the monocular vision camera.
[0093] Furthermore, when the target robot dog is close enough to the target charging pile, the monocular vision camera cannot capture the target charging pile. At this time, the computer device issues an instruction to the forearm of the target robot dog, so that the forearm of the target robot dog bends until the monocular vision camera can capture the target charging pile again.
[0094] For example, when it is detected that the target charging pile does not exist in the target image, the target robot dog is paused from moving toward the target charging pile, and the forearm of the target robot dog is controlled to bend to the target angle; when the forearm of the target robot dog is bent to the target angle and the target charging pile reappears in the target image captured by the monocular vision camera, the target robot dog is controlled to move toward the target charging pile again.
[0095] In actual application scenarios, it may happen that the target robot dog has adjusted the bending angle of its forearm to the limit but the monocular vision camera still cannot capture the target charging pile. At this time, the shooting direction of the monocular vision camera may be deviated. The computer device can adjust the direction of the target robot dog to adjust the shooting direction of the monocular vision camera until the monocular vision camera captures the target charging pile again.
[0096] For example, when the forearm of the target robot dog is bent to the target angle, and the target charging pile does not appear in the target image captured in real time by the monocular vision camera, the target robot dog is controlled to rotate in place and capture the surrounding environment image in real time; when the target charging pile is detected in the surrounding environment image, the orientation of the target charging pile and the target robot dog is re-determined according to the position of the target charging pile in the surrounding environment image to control the target robot dog to move toward the target charging pile.
[0097] It should be noted that when the target robot dog is in place, that is, the distance between the target robot dog and the target charging pile does not change, but the forearm of the target robot dog is bent, the viewing angle of the monocular vision camera changes, and the target image changes, and then the position of the target charging pile in the target image (the center point coordinate p of the target charging pile) and the image area size (the size of the identification frame of the target charging pile) change. In this case, it is still necessary to combine the center point p of the target charging pile with the size of the identification frame to calculate the distance between the target robot dog and the target charging pile.
[0098] When the computer device controls the target robot dog to move toward the target charging pile until the distance between the target robot dog and the target charging pile is close, that is, less than the first distance threshold, the computer device switches the far-field recognition to the near-field recognition.
[0099] Optionally, the target robot dog is also provided with a depth vision camera. The depth camera is used to construct a first point cloud of the virtual charging pile directly below the target robot dog and with the head of the target robot dog as the reference direction.
[0100] Furthermore, a point cloud is constructed for the area where the target charging pile is located through a depth vision camera. The point cloud and the target robot dog are in the same world coordinate system. Since the point cloud contains the point cloud of the target charging pile and the point cloud of the surrounding environment, it is necessary to process the point cloud of the area where the target charging pile is located and segment the point cloud of the target charging pile.
[0101] For example, the depth image of the target charging pile is segmented to obtain a second point cloud of the target charging pile. The first point cloud is used as the target point cloud. Once the second point cloud overlaps with the first point cloud, it means that the target robot dog is aligned with the target charging pile and charging can be performed.
[0102] Figure 5 A schematic diagram of model segmentation involved in an embodiment of the present application is shown, such as Figure 5 As shown in the figure, the light-colored part is the model of the surrounding environment (ground), and the dark-colored part is the model of the target charging pile. The darker the color, the higher the distance from the ground. Figure 5 As shown, after the ground and the target charging pile are segmented, feature point recognition can be performed on the model of the target charging pile obtained after segmentation to obtain a second point cloud corresponding to the target charging pile.
[0103] Furthermore, the first point cloud and the second point cloud are processed by an ICP algorithm to obtain the relative pose.
[0104] For example, the ICP algorithm, or iterative closest point method, is a point cloud matching algorithm. Through the ICP algorithm, the rotation matrix and translation vector between the first point cloud and the second point cloud can be obtained, and then the relative pose between the first point cloud and the second point cloud can be obtained through mapping, that is, the relative pose between the target charging pile and the target robot dog.
[0105] The relative posture not only includes the position information between the target charging pile and the target robot dog, but also includes the posture information between the target charging pile and the target robot dog because the target charging pile in this embodiment is a cross shape and the target robot dog cannot be aligned with the target charging pile if it is not adjusted to a suitable angle.
[0106] Step 303, based on the inertial navigation information collected by the inertial navigation device provided on the target robot dog, determine the world coordinates of the target robot dog; based on the world coordinates of the target robot dog and the relative posture, determine the target posture information of the target charging pile in the world coordinate system.
[0107] After obtaining the relative position and posture between the target charging pile and the target robot dog, since the first point cloud (target robot dog) and the second point cloud (target charging pile) are in the same world coordinate system, the world coordinates of the target robot dog can be obtained through the inertial navigation device of the target robot dog first, and then the world coordinates of the target charging pile can be calculated based on the relative position and posture. Combined with the relative posture information of the target charging pile and the target robot dog, the target position and posture information of the target charging pile in the world coordinate system can be obtained.
[0108] Step 304, based on the target posture information, control the target robot dog to navigate to above the target charging pile; control the bending angles of the forearm and the rear arm of the target robot dog to connect the charging interface of the target robot dog to the target charging pile.
[0109] Optionally, the target posture information of the target charging pile in the world coordinate system is set as the navigation point posture, and the computer device navigates the target robot dog to the top of the charging pile so that the charging interface on the abdomen of the target robot dog is aligned with the power supply interface on the top of the target charging pile, and then the charging interface is docked with the power supply interface by adjusting the bending angle of the forearm and rear arm of the target robot dog, and charging can begin.
[0110] In summary, the distance between the target robot dog and the target charging pile is detected in real time; when it is detected that the distance between the target robot dog and the target charging pile is greater than the first distance threshold, the target robot dog is controlled to move toward the target charging pile; when it is detected that the distance between the target robot dog and the target charging pile is less than the first distance threshold, the relative posture between the target charging pile and the target robot dog is determined; based on the relative posture, the target robot dog is controlled to move above the target charging pile to realize charging of the target robot dog. Therefore, when the above method realizes the automatic charging function of the robot dog, by real-time detection of the distance and relative posture between the target charging pile and the target robot dog, the target robot dog can be automatically aligned with the target charging pile, and the accuracy of the alignment and charging of the target robot dog and the target charging pile is guaranteed.
[0111] Figure 6 The following is a block diagram of a robot dog automatic charging device according to an exemplary embodiment. The robot dog automatic charging device is applied to a control device, and the control device is provided on a target robot dog. The device includes:
[0112] The distance detection module 601 is used to detect the distance between the target robot dog and the target charging pile in real time;
[0113] The first moving module 602 is used to control the target robot dog to move toward the target charging pile when it is detected that the distance between the target robot dog and the target charging pile is greater than a first distance threshold;
[0114] A relative posture acquisition module 603 is used to determine the relative posture between the target charging pile and the target robot dog when it is detected that the distance between the target robot dog and the target charging pile is less than a first distance threshold;
[0115] The second moving module 604 is used to control the target robot dog to move above the target charging pile based on the relative posture to realize charging of the target robot dog.
[0116] In a possible implementation, the target robot dog is equipped with a monocular vision camera;
[0117] The real-time detection of the distance between the target robot dog and the target charging pile includes:
[0118] Acquire the target image captured by the monocular vision camera in real time;
[0119] Performing target detection on the target image through the charging pile recognition model to obtain the position of the target charging pile in the target image and the size of the image area of the target charging pile in the target image;
[0120] Determine the distance between the target robot dog and the target charging pile according to the size of the image area;
[0121] The controlling the target robot dog to move toward the target charging pile includes:
[0122] Based on the position of the target charging pile in the target image, determining the target orientation of the target charging pile relative to the target robot dog;
[0123] Based on the target position, the target robot dog is controlled to move toward the target charging pile.
[0124] In a possible implementation, the monocular vision camera is located on the head of the robot dog, and when the target robot dog is controlled to move toward the target charging pile, target detection is performed on the target image captured in real time by the monocular vision camera;
[0125] When it is detected that the target charging pile does not exist in the target image, the movement of the target robot dog toward the target charging pile is paused, and the forearm of the target robot dog is controlled to bend to a target angle;
[0126] When the forearm of the target robot dog is bent to the target angle and the target charging pile reappears in the target image captured by the monocular vision camera, the target robot dog is controlled to move toward the target charging pile again.
[0127] In a possible implementation, when the forearm of the target robot dog is bent to a target angle and the target charging pile does not appear in the target image captured in real time by the monocular vision camera, the target robot dog is controlled to rotate in situ and capture the surrounding environment image in real time;
[0128] When it is detected that the target charging pile exists in the surrounding environment image, the orientation of the target charging pile and the target robot dog is re-determined according to the position of the target charging pile in the surrounding environment image to control the target robot dog to move toward the target charging pile.
[0129] In a possible implementation, the target robot dog is also equipped with a wireless communication component;
[0130] When it is detected that the target charging pile does not exist in the target image, a positioning signal is sent to the target charging pile through the wireless communication component;
[0131] When the location information is received, the distance information between the target charging pile and the target robot dog, as well as the target orientation of the target charging pile relative to the target robot dog are determined according to the location information.
[0132] In a possible implementation, the target robot dog is also provided with a depth vision camera;
[0133] The determining the relative position between the target charging pile and the target robot dog includes:
[0134] Directly below the target robot dog, with the head of the target robot dog as a reference direction, construct a first point cloud of the virtual charging pile;
[0135] Performing image segmentation on the depth image of the target charging pile to obtain a second point cloud of the target charging pile;
[0136] The first point cloud and the second point cloud are processed by the ICP algorithm to obtain the relative pose.
[0137] In a possible implementation, the target robot dog is also provided with an inertial navigation device;
[0138] Based on the relative position, controlling the target robot dog to move above the target charging pile to charge the target robot dog includes:
[0139] Determine the world coordinates of the target robot dog based on the inertial navigation information collected by the inertial navigation device;
[0140] Based on the world coordinates of the target robot dog and the relative position and posture, determine the target position and posture information of the target charging pile in the world coordinate system;
[0141] Based on the target position information, control the target robot dog to navigate to above the target charging pile;
[0142] The bending angles of the forearm and the rear arm of the target robot dog are controlled to connect the charging interface of the target robot dog to the target charging pile.
[0143] Figure 7The structural block diagram of a computer device 700 shown in an exemplary embodiment of the present application is shown. The computer device can be implemented as the server in the above-mentioned solution of the present application. The computer device 700 includes a central processing unit (CPU) 701, a system memory 704 including a random access memory (RAM) 702 and a read-only memory (ROM) 703, and a system bus 705 connecting the system memory 704 and the central processing unit 701. The computer device 700 also includes a large-capacity storage device 706 for storing an operating system 709, an application program 710 and other program modules 711.
[0144] The mass storage device 706 is connected to the central processing unit 701 via a mass storage controller (not shown) connected to the system bus 705. The mass storage device 706 and its associated computer readable medium provide non-volatile storage for the computer device 700. That is, the mass storage device 706 may include a computer readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.
[0145] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM) flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage medium is not limited to the above. The above-mentioned system memory 704 and mass storage device 706 can be collectively referred to as memory.
[0146] According to various embodiments of the present disclosure, the computer device 700 can also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device 700 can be connected to the network 708 through the network interface unit 707 connected to the system bus 705, or the network interface unit 707 can be used to connect to other types of networks or remote computer systems (not shown).
[0147] The memory further includes at least one computer program, which is stored in the memory. The central processing unit 701 implements all or part of the steps in the methods shown in the above embodiments by executing the at least one computer program.
[0148] In an exemplary embodiment, a computer-readable storage medium is also provided, which is used to store at least one computer program, and the at least one computer program is loaded and executed by a processor to implement all or part of the steps in the above method. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0149] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned Figure 2 or Figure 3 All or part of the steps of the method shown in any embodiment.
[0150] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0151] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for automatically charging a robot dog, characterized in that: The method is applied to a control device, the control device is arranged on a target robot dog, the target robot dog is equipped with a monocular vision camera, a depth vision camera and an inertial navigation device, the monocular vision camera is located on the head of the robot dog, and the method comprises: Acquire the target image captured by the monocular vision camera in real time; perform target detection on the target image through the charging pile recognition model to obtain the position of the target charging pile in the target image and the image area size of the target charging pile in the target image; determine the distance between the target robot dog and the target charging pile according to the position of the target charging pile in the target image and the image area size; When it is detected that the distance between the target robot dog and the target charging pile is greater than a first distance threshold, the target robot dog is controlled to move toward the target charging pile. When the target robot dog is controlled to move toward the target charging pile, target detection is performed on the target image captured by the monocular vision camera in real time; when it is detected that the target charging pile does not exist in the target image, the movement of the target robot dog toward the target charging pile is paused, and the forearm of the target robot dog is controlled to bend to a target angle; after the forearm of the target robot dog is bent to a target angle, and the target charging pile reappears in the target image captured by the monocular vision camera, the target robot dog is controlled to move toward the target charging pile again; When it is detected that the distance between the target robot dog and the target charging pile is less than a first distance threshold, the depth vision camera is used to construct a first point cloud of the virtual charging pile directly below the target robot dog, with the head of the target robot dog as the reference direction; the depth image of the target charging pile is segmented, and the model of the target charging pile obtained after segmentation is identified with feature points to obtain a second point cloud of the target charging pile; the first point cloud and the second point cloud are registered by the ICP algorithm to obtain the rotation matrix and the translation vector between the first point cloud and the second point cloud, and the relative position between the target charging pile and the target robot dog is obtained by mapping according to the rotation matrix and the translation vector; Based on the inertial navigation information collected by the inertial navigation device, the world coordinates of the target robot dog are determined; based on the world coordinates of the target robot dog and the relative posture, the target posture information of the target charging pile in the world coordinate system is determined; based on the target posture information, the target robot dog is controlled to navigate to the top of the target charging pile; the bending angles of the forearm and the hind arm of the target robot dog are controlled to connect the charging interface on the abdomen of the target robot dog with the power supply interface on the top of the target charging pile to realize charging of the target robot dog.
2. The method according to claim 1, characterized in that The controlling the target robot dog to move toward the target charging pile includes: Based on the position of the target charging pile in the target image, determining the target orientation of the target charging pile relative to the target robot dog; Based on the target position, the target robot dog is controlled to move toward the target charging pile.
3. The method according to claim 2, characterized in that The target robot dog is also equipped with a wireless communication component; The method further comprises: When it is detected that the target charging pile does not exist in the target image, sending a positioning signal to the target charging pile through the wireless communication component; When the location information is received, the distance information between the target charging pile and the target robot dog, and the target orientation of the target charging pile relative to the target robot dog are determined according to the location information.
4. The method according to claim 1, characterized in that: The method further comprises: When the forearm of the target robot dog is bent at a target angle and the target charging pile does not appear in the target image captured in real time by the monocular vision camera, the target robot dog is controlled to rotate in situ and capture the surrounding environment image in real time; When the target charging pile is detected in the surrounding environment image, the orientation of the target charging pile and the target robot dog is re-determined according to the position of the target charging pile in the surrounding environment image to control the target robot dog to move toward the target charging pile.
5. The method according to claim 1, characterized in that The target robot dog is equipped with a laser radar, and the method further includes: The laser radar measures the flight time of the laser and detects the distance between the target charging pile and the target robot dog.
6. The method according to claim 1, characterized in that The target robot dog is equipped with an ultrasonic sensor, and the method further comprises: The ultrasonic sensor emits ultrasonic waves and receives ultrasonic reflection signals to obtain the distance between the target charging pile and the target robot dog.
7. The method according to claim 1, characterized in that The controlling the target robot dog to move toward the target charging pile includes: The target robot dog is controlled to move in a forward direction, and the target robot dog is rotated so that the forward direction of the target robot dog faces the target charging pile.
8. A robot dog automatic charging device, characterized in that: The device is applied to a control device, the control device is arranged on a target robot dog, the target robot dog is equipped with a monocular vision camera, a depth vision camera and an inertial navigation device, the monocular vision camera is located on the head of the robot dog, and the device comprises: A distance detection module is used to acquire the target image captured by the monocular vision camera in real time; perform target detection on the target image through a charging pile recognition model to obtain the position of the target charging pile in the target image and the size of the image area of the target charging pile in the target image; determine the distance between the target robot dog and the target charging pile according to the position of the target charging pile in the target image and the size of the image area; A first moving module is used for, when it is detected that the distance between the target robot dog and the target charging pile is greater than a first distance threshold, and when the target robot dog is controlled to move toward the target charging pile, performing target detection on the target image acquired in real time by the monocular vision camera; when it is detected that the target charging pile does not exist in the target image, pausing the movement of the target robot dog toward the target charging pile, and controlling the forearm of the target robot dog to bend to a target angle; after the forearm of the target robot dog is bent to a target angle, and the target charging pile reappears in the target image acquired by the monocular vision camera, controlling the target robot dog to move toward the target charging pile again; A relative posture acquisition module is used to construct a first point cloud of a virtual charging pile by using the depth vision camera directly below the target robot dog and taking the head of the target robot dog as a reference direction when it is detected that the distance between the target robot dog and the target charging pile is less than a first distance threshold; perform image segmentation on the depth image of the target charging pile, perform feature point recognition on the model of the target charging pile obtained after segmentation, and obtain a second point cloud of the target charging pile; align the first point cloud and the second point cloud by using an ICP algorithm to obtain a rotation matrix and a translation vector between the first point cloud and the second point cloud, and obtain the relative posture between the target charging pile and the target robot dog by mapping according to the rotation matrix and the translation vector; The second mobile module is used to determine the world coordinates of the target robot dog based on the inertial navigation information collected by the inertial navigation device; determine the target posture information of the target charging pile in the world coordinate system based on the world coordinates of the target robot dog and the relative posture; control the target robot dog to navigate to the top of the target charging pile based on the target posture information; control the bending angles of the forearm and the rear arm of the target robot dog to connect the charging interface on the abdomen of the target robot dog with the power supply interface on the top of the target charging pile to realize charging of the target robot dog.
9. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the automatic charging method for a robot dog as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the automatic charging method for the robot dog as described in any one of claims 1 to 7.
