Robot navigation and motion control method, device and equipment and storage medium
By receiving laser point cloud and odometer data to create an inspection map, and combining STM32 timers and incremental PID controllers, the problem of path selection and precise motion control for inspection robots in complex environments was solved, enabling autonomous navigation and obstacle avoidance.
Patent Information
- Application Number
- CN202511733999.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-02-17
AI Technical Summary
When inspection robots use fixed routes to inspect in complex environments, they may fail to cover new risk points or cause collisions. Furthermore, after running for a long time, the odometer may accumulate errors, causing deviations from the preset path or missed inspection of critical areas.
An inspection map is created by receiving laser point cloud data and odometer motion data from the robot. Path planning is performed based on real-time pose. The actual rotation speed of the left and right wheels is read using an STM32 timer, and the motor speed is adjusted by an incremental PID controller to drive the robot to move at the target speed.
It enables autonomous path selection and precise motion control of robots in complex environments, reduces speed control deviation caused by accumulated odometry errors, and ensures that the robot moves along the preset path.
Smart Images

Figure CN121541641A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of robot control, and more particularly to a method, apparatus, device, and storage medium for navigation and motion control of a robot. Background Technology
[0002] The nacelle of a wind turbine is located at high altitude, and manual inspection poses certain safety hazards and is costly. Therefore, in order to reduce safety risks and operating costs, robots are usually used to inspect key areas in the nacelle, such as robots that inspect the fire-fighting area of the nacelle.
[0003] Currently, most inspection robots use fixed routes to conduct simple inspections of fire-fighting areas and send the inspection information to the backend. However, during the inspection process, problems may arise such as changes in the layout of the cabin equipment, the addition of new obstacles, or the relocation of fire-fighting equipment, which may cause the fixed route to fail to cover new risk points or result in collisions, thus affecting the robot's normal inspection work. Summary of the Invention
[0004] To address the aforementioned technical problems, this disclosure provides a navigation and motion control method, apparatus, device, and storage medium for robots, which enables robots to create maps, plan paths, and navigate, and to perform autonomous path selection even in complex environments.
[0005] In a first aspect, embodiments of this disclosure provide a navigation and motion control method for a robot, the method comprising: The system receives sensor data from the robot and creates an inspection map based on the sensor data; wherein the sensor data includes laser point cloud data and odometry motion data. Based on the robot's real-time pose in the inspection map, path planning is performed to obtain the robot's motion commands; wherein, the motion commands include linear velocity and angular velocity, and the linear velocity and angular velocity are used to calculate the target rotational speed of the robot's left and right wheels; The actual rotational speed of the robot's left and right wheels is read using a target timer; The robot's motor speed is adjusted based on the difference between the target speed and the actual speed, so as to drive the robot's left and right wheels to move at the target speed.
[0006] In one optional implementation, the target timer includes an STM32 timer, and reading the actual rotational speed of the robot's left and right wheels via the target timer includes: The STM32 timer is activated in quadrature encoding mode to count the A / B phase pulses of the encoder, obtaining the count values corresponding to multiple time points respectively; The actual rotational speed of the robot's left and right wheels is determined based on the count values corresponding to adjacent time points among the plurality of time points.
[0007] In one optional implementation, the step of activating the quadrature encoder mode of the STM32 timer to count the A / B phase pulses of the encoder and obtaining count values corresponding to multiple time points includes: Set the STM32 timer to quadrature encoding mode and input encoder A / B phase pulses to the STM32 timer; When the quadrature signal generated by the encoder A / B phase pulse is detected, the current count value of the STM32 timer is incremented by 1. When the TIM7 timer reaches the preset sampling period, the count value corresponding to the first time point is obtained.
[0008] In one optional implementation, adjusting the robot's motor speed based on the difference between the target speed and the actual speed includes: The target speed and the actual speed are input into an incremental PID controller, which outputs a PWM increment based on the target speed and the actual speed. The PWM increment is used to adjust the PWM duty cycle, which is used to adjust the average voltage across the motor to control the motor speed of the robot.
[0009] In one optional implementation, creating the inspection map based on the sensor data includes: Determine the first pose of the first point cloud data in the sensor data in the first sub-graph, and insert the first point cloud data into the first sub-graph based on the first pose to obtain the updated second sub-graph; When it is determined that the second subgraph is in a completed state, the second subgraph is identified as an inspection map and added to the target set; wherein, the target set is used to store the subgraphs that have been completed.
[0010] In one optional implementation, the method further includes: Receive the second point cloud data collected by the lidar; If it is determined that the estimated pose of the second point cloud data and the third point cloud data in the inspection map meet the preset pose proximity condition, then a closure constraint is established between the second point cloud data and the third point cloud data.
[0011] Secondly, this disclosure provides a navigation and motion control device for a robot, the device comprising: A creation module is used to receive sensor data from the robot and create an inspection map based on the sensor data; wherein, the sensor data includes laser point cloud data and odometry motion data; The planning module is used to perform path planning based on the robot's real-time pose in the inspection map to obtain the robot's motion commands; wherein, the motion commands include linear velocity and angular velocity, and the linear velocity and angular velocity are used to calculate the target rotational speed of the robot's left and right wheels; The reading module is used to read the actual rotational speed of the robot's left and right wheels via a target timer; An adjustment module is used to adjust the motor speed of the robot according to the difference between the target speed and the actual speed, so as to drive the left and right wheels of the robot to move at the target speed.
[0012] Thirdly, this disclosure provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to implement the above-described method.
[0013] Fourthly, this disclosure provides a navigation and motion control device for a robot, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0014] Fifthly, this disclosure provides a computer program product comprising a computer program / instruction that, when executed by a processor, implements the method described above.
[0015] The technical solution provided in this disclosure has at least the following advantages compared with the prior art: This disclosure provides a navigation and motion control method, apparatus, device, and storage medium for a robot. Specifically, upon receiving laser power data and odometer motion data from the robot, an inspection map is first created based on the aforementioned sensor data. Then, path planning is performed based on the robot's real-time pose on the inspection map to obtain the robot's motion commands. These motion commands include linear velocity and angular velocity, which are used to calculate the target rotational speeds of the robot's left and right wheels. Next, the actual rotational speeds of the robot's left and right wheels are read through a target timer, and the robot's motor speed is adjusted based on the difference between the target rotational speed and the actual rotational speed to drive the robot's left and right wheels to move at the target rotational speed.
[0016] As can be seen, the embodiments of this disclosure can create an inspection map using real-time collected laser point cloud data and odometer motion data, and perform path planning based on the robot's real-time pose in the inspection map to control the robot to move along a preset path. Compared with the simple inspection of fire-fighting areas using fixed routes, the navigation control method provided by the embodiments of this disclosure can realize the creation of maps, path planning and positioning navigation of the robot, and can also perform autonomous path selection in complex environments. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating a navigation and motion control method for a robot provided in an embodiment of this disclosure; Figure 2 A flowchart of robot low-level motion control provided in this embodiment of the present disclosure; Figure 3 A schematic diagram of the structure of a robot navigation and motion control device provided in an embodiment of this disclosure; Figure 4 This is a schematic diagram of the structure of a robot navigation and motion control device provided in an embodiment of the present disclosure. Detailed Implementation
[0020] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0021] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0022] Currently, most inspection robots use fixed routes to conduct simple inspections of fire-fighting areas and send the inspection information to the backend. However, during the inspection process, problems may arise such as changes in the layout of the cabin equipment, the addition of new obstacles, or the relocation of fire-fighting equipment, which may cause the fixed route to fail to cover new risk points or result in collisions, thus affecting the robot's normal inspection work.
[0023] In addition, after the inspection robot has been running on a fixed route for a long time, problems such as the robot deviating from the preset path or missing key areas may occur due to the cumulative error of the odometer.
[0024] Therefore, this disclosure provides a navigation and motion control method for a robot. Specifically, upon receiving laser power data and odometer motion data from the robot, an inspection map is first created based on the aforementioned sensor data. Then, path planning is performed based on the robot's real-time pose on the inspection map to obtain the robot's motion commands. These motion commands include linear velocity and angular velocity, which are used to calculate the target rotational speeds of the robot's left and right wheels. Next, the actual rotational speeds of the robot's left and right wheels are read through a target timer, and the robot's motor speed is adjusted based on the difference between the target rotational speed and the actual rotational speed to drive the robot's left and right wheels to move at the target rotational speed.
[0025] As can be seen, the embodiments of this disclosure can create an inspection map using real-time collected laser point cloud data and odometer motion data, and perform path planning based on the robot's real-time pose in the inspection map to control the robot to move along a preset path. Compared with the simple inspection of fire-fighting areas using fixed routes, the navigation control method provided by the embodiments of this disclosure can realize the creation of maps, path planning and positioning navigation of the robot, and can also perform autonomous path selection in complex environments.
[0026] In addition, the embodiments disclosed herein can also utilize the difference between the target speed and the actual speed to dynamically adjust and correct the motor speed, thereby reducing the problem of deviation in robot speed control caused by the cumulative error of the odometer, driving the left and right wheels of the robot to move at the target speed, and realizing precise motion control of the robot.
[0027] Based on the above method embodiments, this disclosure provides a navigation and motion control method for a robot, such as... Figure 1 The diagram shown is a flowchart illustrating a robot navigation and motion control method provided in an embodiment of this disclosure.
[0028] S101: Receive sensor data from the robot and create an inspection map based on the sensor data.
[0029] The sensor data includes laser point cloud data and odometer motion data.
[0030] The sensor data in this embodiment includes the robot's odometer motion data and laser point cloud data collected in real time by lidar. The odometer motion data is the motion state information measured in real time by the robot's own sensors, specifically the data sent to the robot's core board by the STM32 timer through a window.
[0031] In this embodiment of the disclosure, after receiving the robot's odometer motion data and laser point cloud data, an inspection map of the robot is created based on the odometer motion data and laser point cloud data.
[0032] Specifically, after receiving the sensor data, the first pose of the first point cloud data in the sensor data in the first sub-graph is determined.
[0033] The first point cloud data can be any point cloud data in the sensor data. The first sub-map refers to a map composed of multiple point cloud data. When inserting the first point cloud data into the first sub-map, it is first necessary to estimate the best insertion position of the first point cloud data in the first sub-map, that is, the estimated pose of the first point cloud data in the first sub-map. Usually, the estimated pose of the first point cloud data can be estimated by matching the point cloud data in the first sub-map with the first point cloud data.
[0034] After determining the estimated pose of the first point cloud data in the first subgraph, the first point cloud data is inserted into the first subgraph based on the estimated pose to obtain the updated second subgraph.
[0035] When the second subgraph is determined to be in a completed state, i.e., no new point cloud data is inserted into the second subgraph, the second subgraph is identified as the robot's inspection map and added to the target set. The target set, also known as the loop closure detection candidate set, stores all completed maps and serves as the search space for global loop closure matching of subsequent new point cloud data.
[0036] As time goes on, with more and more submaps being created, the cumulative error between submaps also increases. Therefore, in the process of constructing submaps, it is also necessary to eliminate the cumulative error between submaps caused by odometer drift or sensor noise in the lidar, so as to prevent the map and trajectory from becoming seriously distorted over time.
[0037] Specifically, upon receiving the second point cloud data collected by the lidar, it is first determined whether there is point cloud data in the inspection map whose estimated pose matches the estimated pose of the second point cloud data under a preset pose proximity condition. If it is determined that the estimated pose of the second point cloud data matches the preset pose proximity condition of the third point cloud data in the inspection map, a closure constraint is established between the second and third point cloud data. This closure constraint is then added to the pose optimization problem to eliminate the cumulative error between sub-maps.
[0038] In one alternative implementation, a search window can be set next to the estimated pose of the second point cloud data, and the best matching pose can be found in the search window through a preset scanning matching strategy.
[0039] Specifically, the laser points of the second point cloud data are projected onto the grid of the inspection map, and the sum of the hit probabilities under each candidate pose is calculated as a scoring function. Then, the candidate poses are traversed on the grid to determine the candidate pose with the highest score, and sub-pixel-level optimization is performed using a small range of gradient descent. When the score exceeds a preset threshold, it is considered that the best matching pose has been found. At this time, the closure constraint between the best matching pose and the estimated pose of the second point cloud data can be added to the back-end optimization to eliminate the cumulative error between sub-maps.
[0040] As can be seen, the embodiments of this disclosure can complete the synchronous localization and map construction of the robot in an unknown environment based on sensor data such as LiDAR, providing a basic map and positioning benchmark for the robot's subsequent path planning, autonomous navigation and obstacle avoidance.
[0041] S102: Based on the robot's real-time pose in the inspection map, perform path planning to obtain the robot's motion commands.
[0042] The motion command includes linear velocity and angular velocity, which are used to calculate the target rotational speed of the robot's left and right wheels.
[0043] In this embodiment of the disclosure, after creating an inspection map for the robot based on sensor data, path planning is performed based on the robot's real-time pose in the inspection map to obtain the robot's motion commands. It is worth noting that, while creating the inspection map, this embodiment of the disclosure can also estimate the robot's real-time pose based on sensor data, and then perform path planning based on the real-time pose and the inspection map to obtain the robot's motion commands.
[0044] The motion commands include linear velocity and angular velocity. Linear velocity is used to control the robot's forward or backward speed, and angular velocity is used to control the robot's rotation speed. The linear velocity and angular velocity in the motion commands can realize the robot's low-level motion control, such as controlling the inspection robot to stop, move forward in a straight line, move backward, and turn with zero radius.
[0045] Specifically, upon receiving a motion command, the robot's movement can be controlled by adjusting the speeds of its left and right wheels. When both the received angular velocity and linear velocity are 0, the rotational speeds of both wheels are set to 0, causing the inspection robot to stop. When the received angular velocity is greater than 0, the left wheel is controlled to rotate clockwise, while the right wheel rotates counterclockwise at the same speed, achieving a zero-radius left turn for the inspection robot. When the received angular velocity is less than 0, the right wheel is controlled to rotate clockwise, while the left wheel rotates counterclockwise at the same speed, achieving a zero-radius right turn for the inspection robot.
[0046] In one optional implementation, the angular velocity and the radius of rotation can be multiplied, and the result of the product can be used as the linear velocity of the wheel rotation. When the received angular velocity is 0 and the linear velocity is not 0, the linear velocity of the left and right wheels can be controlled to be consistent with the linear velocity required for forward or backward movement.
[0047] As can be seen, the speed calculation layer of this embodiment converts linear velocity and angular velocity into target rotational speeds of the left and right wheels, enabling information transmission from the navigation control layer to the underlying motion control layer.
[0048] S103: Read the actual rotation speed of the robot's left and right wheels through the target timer.
[0049] In this embodiment of the disclosure, after obtaining the target rotational speeds of the robot's left and right wheels, the target rotational speeds of the robot's left and right wheels are read through a target timer.
[0050] The target timer can be an STM32 timer. The specific steps for obtaining the actual rotation speed of the left and right wheels using the STM32 timer can include: First, start the quadrature encoding mode of the STM32 timer to count the A / B phase pulses of the encoder and obtain the count values corresponding to multiple time points; then, determine the actual rotation speed of the robot's left and right wheels based on the count values corresponding to adjacent time points among the multiple time points.
[0051] In one alternative implementation, a quadruple frequency mode can be used to count the pulses, that is, each rising and falling edge of the encoder A / B phase output pulse is counted. For example, the rising edge of A, the falling edge of A, the rising edge of B, and the falling edge of B are counted a total of 4 times. This can improve the resolution of the count value and make the final calculated actual speed more accurate.
[0052] For example, assuming count is the value of a counter, when the A and B phase pulses are input in the positive direction, the counter becomes count+4 after one cycle. By calculating the increment of count, the actual rotational speed of the left and right wheels can be obtained.
[0053] In one optional implementation, the STM32 timer is activated in quadrature encoding mode to count the A / B phase pulses of the encoder, obtaining count values corresponding to multiple time points. Specifically, this may include: Set the STM32 timer to quadrature encoding mode, and input the encoder A / B phase pulses into the STM32 timer; when the quadrature signal generated by the encoder A / B phase pulses is detected, control the current count value of the STM32 timer to increment by 1; when the TIM7 timer reaches the preset sampling period, obtain the count value corresponding to the first time point.
[0054] The TIM7 timer is the speed measurement timer. The auto-reload register period is set to 5000, the clock frequency is 72MHz, and the divider is 71, so the clock period is 5000 * (71 + 1) / 72MHz = 5ms. The left and right wheel speeds are calculated identically. Then, a function is called to obtain the current pulse increment of the left wheel. One revolution of the motor shaft requires 16 pulse lines.
[0055] S104: Adjust the motor speed of the robot according to the difference between the target speed and the actual speed, so as to drive the left and right wheels of the robot to move at the target speed.
[0056] In this embodiment of the disclosure, an incremental PID controller can be used to achieve closed-loop control of the inspection robot's speed, and the deviation between the actual rotation speed of the left and right wheels obtained from the encoder and the target rotation speed can be used to correct the speed.
[0057] Specifically, after obtaining the target speed and actual speed of the robot, the target speed and actual speed are input into the incremental PID controller. The incremental PID controller outputs PWM increments based on the target speed and actual speed, so as to adjust the robot's motor speed using the PWM increments.
[0058] The PWM increment is the change in the PWM duty cycle, used to adjust the PWM duty cycle. The PWM duty cycle controls the robot's motor speed by adjusting the average voltage across the motor terminals.
[0059] The core of the incremental PID controller for controlling motor speed is the incremental PID speed control function. Timer 7 interrupts every 5ms, meaning the motor speed is measured every 5ms. The measured speed is compared with the set speed and fed into the incremental PID controller, which outputs PWM increments to adjust the motor speed. The control algorithm formula can be: ; in, This represents incremental output, corresponding to the incremental output of PWM. This represents the deviation, that is, the difference between the actual speed and the target speed. This represents a deviation of the mountain once. This represents the deviation from the previous one. Represents the proportionality coefficient. Represents the integral coefficient. Represents the differential coefficient.
[0060] In one alternative implementation, the parameters of the incremental PID controller can also be adjusted using a trial-and-error method, i.e., the parameters are adjusted first. ,Will , Set all parameters to 0, then adjust the parameters. This makes the robot's actual speed roughly equal to the given speed. At this point, the system will oscillate significantly; the next step is to adjust the parameters. ,at this time, Reduced to 0.83 times the original amount, adjusted. The main issue is addressing the oscillation problem, which causes system delays. Further adjustments will then be made. ,Adjustment To ensure smooth transitions in robot speed during acceleration and deceleration, the basic ranges of the three PID parameters were roughly determined. Finally, actual tests were conducted on the motion control of the inspection robot to fine-tune these parameters and improve the accuracy of error correction.
[0061] As can be seen, the incremental PID controller provided in this embodiment can dynamically correct the motor control quantity according to the difference between the target speed and the actual speed, drive the wheels to accurately track the target speed, and achieve the precise motion control required for straight driving, turning on the spot and obstacle avoidance.
[0062] In the robot navigation and motion control method provided in this embodiment, upon receiving the robot's laser power data and odometer motion data, an inspection map is first created based on the aforementioned sensor data. Then, path planning is performed based on the robot's real-time pose in the inspection map to obtain the robot's motion command. This motion command includes linear velocity and angular velocity, which are used to calculate the target rotational speed of the robot's left and right wheels. Next, the actual rotational speed of the robot's left and right wheels is read through a target timer, and the robot's motor speed is adjusted based on the difference between the target rotational speed and the actual rotational speed to drive the robot's left and right wheels to move at the target rotational speed.
[0063] As can be seen, the embodiments of this disclosure can create an inspection map using real-time collected laser point cloud data and odometer motion data, and perform path planning based on the robot's real-time pose in the inspection map to control the robot to move along a preset path. Compared with the simple inspection of fire-fighting areas using fixed routes, the navigation control method provided by the embodiments of this disclosure can realize the creation of maps, path planning and positioning navigation of the robot, and can also perform autonomous path selection in complex environments.
[0064] like Figure 2 The diagram shown is a flowchart of a robot's underlying motion control according to an embodiment of this disclosure.
[0065] First, a laser scanner is used to collect laser point cloud data. Then, an inspection map is created using this laser point cloud data. Specifically, the map is stitched together using the pose matching method described above to obtain the robot's inspection map. Simultaneously, the laser point cloud data is used for localization calculations to determine the robot's real-time pose. Then, based on the robot's real-time pose on the inspection map, path planning is performed to obtain the robot's motion commands. These motion commands control the global movement of the inspection robot. During the robot's inspection of equipment according to the motion commands, the inspection data is uploaded to the inspection system in real time.
[0066] Based on the above method embodiments, this disclosure also provides a robot navigation and motion control device, with reference to... Figure 3 This is a schematic diagram of the structure of a robot navigation and motion control device provided in an embodiment of this disclosure. The device includes: A creation module 301 is used to receive sensor data from the robot and create an inspection map based on the sensor data; wherein, the sensor data includes laser point cloud data and odometry motion data; The planning module 302 is used to perform path planning based on the real-time pose of the robot in the inspection map to obtain the motion command of the robot; wherein, the motion command includes linear velocity and angular velocity, and the linear velocity and angular velocity are used to calculate the target rotational speed of the left and right wheels of the robot; The reading module 303 is used to read the actual rotational speed of the left and right wheels of the robot through a target timer; The adjustment module 304 is used to adjust the motor speed of the robot according to the difference between the target speed and the actual speed, so as to drive the left and right wheels of the robot to move at the target speed.
[0067] In one optional implementation, the target timer includes an STM32 timer, and the reading module includes: The counting submodule is used to start the quadrature encoding mode of the STM32 timer to count the A / B phase pulses of the encoder and obtain the count values corresponding to multiple time points. The determination submodule is used to determine the actual rotational speed of the robot's left and right wheels based on the count values corresponding to adjacent time points among the plurality of time points.
[0068] In one optional implementation, the technical submodule is specifically used for: Set the STM32 timer to quadrature encoding mode and input encoder A / B phase pulses to the STM32 timer; When the quadrature signal generated by the encoder A / B phase pulse is detected, the current count value of the STM32 timer is incremented by 1. When the TIM7 timer reaches the preset sampling period, the count value corresponding to the first time point is obtained.
[0069] In one optional implementation, the adjustment module includes: The output submodule is used to input the target speed and the actual speed to the incremental PID controller, which outputs PWM increments based on the target speed and the actual speed. The PWM increments are used to adjust the PWM duty cycle, which is used to adjust the average voltage across the motor to control the motor speed of the robot.
[0070] In one optional implementation, the creation module includes: An insertion submodule is used to determine the estimated pose of the first point cloud data in the sensor data in the first sub-graph, and insert the first point cloud data into the first sub-graph based on the estimated pose to obtain an updated second sub-graph. The determination submodule is used to determine the second submap as an inspection map and add it to the target set when it is determined that the second submap is in a completed state; wherein, the target set is used to store the maps that have been constructed.
[0071] In one optional implementation, the creation module further includes: The receiving submodule is used to receive the second point cloud data collected by the lidar; A submodule is established to establish a lapsing constraint between the second point cloud data and the third point cloud data if it is determined that the estimated pose of the second point cloud data and the third point cloud data in the inspection map meet the preset pose proximity condition.
[0072] In the robot navigation and motion control device provided in this embodiment, upon receiving the robot's laser power data and odometer motion data, an inspection map is first created based on the aforementioned sensor data. Then, path planning is performed based on the robot's real-time pose in the inspection map to obtain the robot's motion commands. These motion commands include linear velocity and angular velocity, which are used to calculate the target rotational speeds of the robot's left and right wheels. Next, the actual rotational speeds of the robot's left and right wheels are read through a target timer, and the robot's motor speed is adjusted based on the difference between the target rotational speed and the actual rotational speed to drive the robot's left and right wheels to move at the target rotational speed.
[0073] As can be seen, the embodiments of this disclosure can create an inspection map using real-time collected laser point cloud data and odometer motion data, and perform path planning based on the robot's real-time pose in the inspection map to control the robot to move along a preset path. Compared with the simple inspection of fire-fighting areas using fixed routes, the navigation control method provided by the embodiments of this disclosure can realize the creation of maps, path planning and positioning navigation of the robot, and can also perform autonomous path selection in complex environments.
[0074] In addition to the methods and apparatus described above, this disclosure also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to implement the robot navigation and motion control method described in this disclosure.
[0075] This disclosure also provides a computer program product, which includes a computer program / instruction. When the computer program / instruction is executed by a processor, it implements the navigation and motion control method for the robot described in this disclosure.
[0076] In addition, this disclosure also provides an electronic device, see [link to relevant documentation]. Figure 4 As shown, it may include: The electronic device includes a processor 401, a memory 402, an input device 403, and an output device 404. The number of processors 401 in the electronic device can be one or more. Figure 4 Taking a processor as an example. In some embodiments of this disclosure, the processor 401, memory 402, input device 403, and output device 404 can be connected via a bus or other means, wherein, Figure 4 Taking the example of a connection between China and Israel via a bus.
[0077] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications of the electronic device and navigation and motion control of the robot by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The input device 403 can be used to receive input digital or character information, and generate signal inputs related to user settings and function control of the electronic device.
[0078] Specifically in this embodiment, the processor 401 loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize the various functions of the above-mentioned electronic device.
[0079] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0080] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method of navigation and motion control of a robot, characterized by, The method comprises: receiving sensor data of the robot and creating an inspection map according to the sensor data; wherein the sensor data comprises laser point cloud data and odometry motion data; path planning based on a real-time pose of the robot in the inspection map to obtain motion instructions of the robot; wherein the motion instructions comprise linear velocity and angular velocity, and the linear velocity and the angular velocity are used to calculate target rotating speeds of left and right wheels of the robot; reading actual rotating speeds of the left and right wheels of the robot through a target timer; adjusting motor rotating speeds of the robot according to a difference between the target rotating speeds and the actual rotating speeds to drive the left and right wheels of the robot to move at the target rotating speeds.
2. The method of claim 1, wherein, The target timer comprises an STM32 timer, and the reading of the actual rotating speeds of the left and right wheels of the robot through the target timer comprises: starting a quadrature encoder mode of the STM32 timer to count A / B phase pulses of an encoder to obtain count values corresponding to a plurality of time points respectively; determining the actual rotating speeds of the left and right wheels of the robot according to count values corresponding to adjacent time points in the plurality of time points.
3. The method of claim 2, wherein, The starting of the quadrature encoder mode of the STM32 timer to count the A / B phase pulses of the encoder to obtain the count values corresponding to the plurality of time points comprises: setting the STM32 timer to the quadrature encoder mode and inputting the A / B phase pulses of the encoder to the STM32 timer; when detecting quadrature signals generated by the A / B phase pulses of the encoder, controlling the current count value of the STM32 timer to be incremented by 1; when detecting that a TIM7 timer reaches a preset sampling period, obtaining a count value corresponding to a first time point.
4. The method of claim 1, wherein, The adjusting of the motor rotating speeds of the robot according to the difference between the target rotating speeds and the actual rotating speeds comprises: inputting the target rotating speeds and the actual rotating speeds into an incremental PID controller to output a PWM increment based on the target rotating speeds and the actual rotating speeds by the incremental PID controller; wherein the PWM increment is used to adjust a PWM duty cycle, and the PWM duty cycle is used to adjust an average voltage across the motor to control the motor rotating speeds of the robot.
5. The method of claim 1, wherein, The creating of the inspection map according to the sensor data comprises: determining an estimated pose of first point cloud data in the sensor data in a first submap and inserting the first point cloud data into the first submap based on the estimated pose to obtain an updated second submap; when determining that the second submap is in a completed state, determining the second submap as an inspection map and adding the second submap to a target set; wherein the target set is used to store maps that have been completed.
6. The method of claim 5, wherein, The method further comprises: receiving second point cloud data collected by a laser radar; if it is determined that an estimated pose of the second point cloud data meets a preset pose proximity condition with third point cloud data in the inspection map, establishing a loop constraint between the second point cloud data and the third point cloud data.
7. A navigation and motion control apparatus for a robot, characterized by The device comprises: A creation module is used to receive sensor data from the robot and create an inspection map based on the sensor data; wherein, the sensor data includes laser point cloud data and odometry motion data; The planning module is used to perform path planning based on the robot's real-time pose in the inspection map to obtain the robot's motion commands; wherein, the motion commands include linear velocity and angular velocity, and the linear velocity and angular velocity are used to calculate the target rotational speed of the robot's left and right wheels; The reading module is used to read the actual rotational speed of the robot's left and right wheels via a target timer; An adjustment module is used to adjust the motor speed of the robot according to the difference between the target speed and the actual speed, so as to drive the left and right wheels of the robot to move at the target speed.
8. An electronic device, comprising: The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for performing the method as described in any one of claims 1-6.
10. A computer program product, characterised in that, The computer program product includes a computer program / instruction that, when executed by a processor, implements the method as described in any one of claims 1-6.