Robot control method and apparatus
Patent Information
- Application Number
- CN202610935874.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-09-25
AI Technical Summary
[0006]本发明提供一种机器人控制方法及装置,用以解决现有技术中如何使机器人在所处的异常状态下能够以更加生动、自然的方式向用户进行反馈的问题
[0021]本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述机器人控制方法。
Smart Images

Figure CN122815967A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a robot control method and apparatus. Background Technology
[0002] A child companion robot is an intelligent interactive device designed specifically for children. It typically integrates components such as voice recognition, sensors, and cameras, providing emotional companionship, educational support, and safety monitoring through voice dialogue, facial expression interaction, motion sensing, and content playback. With technological advancements, some child companion robots have further developed mobility capabilities, enabling them to move autonomously and engage in richer interactions with users.
[0003] However, robots with mobility functions are prone to various abnormal working states during movement. For example, a robot may get stuck on a foreign object and tip over, or be lifted up by a user and left suspended in mid-air, or be continuously shaken or flipped by a user. In these states, the robot deviates from its normal working posture and is in an abnormal state.
[0004] In response to abnormal states, existing robots often lack effective means of prompting users or only respond with simple voice alarms. This approach makes the robot's reaction in abnormal states rather monotonous and rigid, lacking emotional interaction with the user. This contrasts sharply with the robot's dynamic and rich voice interaction capabilities in normal states, making it difficult for users to accurately and intuitively perceive the robot's current state. It also reduces the fun and approachability of user-robot interaction, thus affecting the user experience.
[0005] Therefore, how to enable robots to provide feedback to users in a more vivid and natural way when they are in abnormal states is a technical problem that urgently needs to be solved. Summary of the Invention
[0006] This invention provides a robot control method and apparatus to solve the problem in the prior art of how to enable robots to provide feedback to users in a more vivid and natural way when they are in an abnormal state.
[0007] This invention provides a robot control method, applied to a robot, comprising: Acquire robot posture data; wherein, the posture data includes the rotation angle data of the robot relative to a reference coordinate system and the acceleration data of the robot, the reference coordinate system is a coordinate system established with the robot body as a reference and containing multiple mutually perpendicular coordinate axes, and the rotation angle data is the angle by which the robot rotates around at least one of the multiple coordinate axes. The posture data is matched with preset abnormal state determination conditions to obtain a state determination result; wherein, the abnormal state determination conditions include angle interval conditions and acceleration conditions corresponding to various abnormal states respectively, and the state determination result is used to indicate the abnormal state of the robot from the various abnormal states. When the state determination result indicates that the robot is in any of the abnormal states, behavioral data matching the corresponding abnormal state is determined according to the state determination result; wherein, the behavioral data includes facial expression data for driving the display component to present anthropomorphic emotions, and limb data for driving the robot's limb structure to perform movements. The robot is controlled to execute the behavioral data so that it exhibits human-like behavior in the abnormal state.
[0008] According to a robot control method provided by the present invention, the reference coordinate system includes a first coordinate axis, a second coordinate axis, and a third coordinate axis that are perpendicular to each other; Wherein, the third coordinate axis is vertical when the robot is in a normal upright posture, and the first and second coordinate axes are located in the horizontal plane when the robot is in a normal upright posture; the rotation of the robot around the first coordinate axis represents the robot's forward and backward tilting, and the rotation of the robot around the second coordinate axis represents the robot's left and right tilting.
[0009] According to a robot control method provided by the present invention, the various abnormal states include a forward-leaning state, a backward-leaning state, a left-leaning state, and a right-leaning state; the method matches the posture data with preset abnormal state determination conditions to obtain a state determination result, including: When the robot rotates around the first coordinate axis in the first rotation direction at an angle within a first set angle range and continues for a preset duration, it is determined that the robot is in the forward-leaning state. When the robot rotates around the first coordinate axis in a second rotation direction opposite to the first rotation direction by an angle within the first set angle range, and continues to do so for the preset duration, it is determined that the robot is in the backward tilt state. When the robot rotates around the second coordinate axis in the first rotation direction at an angle within the first set angle range and continues for the preset duration, it is determined that the robot is in the left tilting state. When the robot rotates around the second coordinate axis in the second rotation direction at an angle within the first set angle range and continues for the preset duration, it is determined that the robot is in the right tilting state. The corresponding state determination result is generated based on the forward leaning state, the backward leaning state, the left leaning state, and the right leaning state.
[0010] According to a robot control method provided by the present invention, the step of determining behavioral data matching the corresponding abnormal state based on the state determination result includes: When the state determination result is the forward-lying state, the limb data is used to drive the robot's ear structure to swing in a cross manner and drive one side of the limb to strike the contact surface. When the state determination result is the backward state, the limb data is used to drive the robot's two forelimbs to swing in a cross motion, and the corresponding facial expression data is the data of a wronged emotional expression. When the state determination result is the left tilt state, the limb data is used to drive the robot's one side forelimb to swing up and down and drive the ear structure on the same side to swing in a cross manner, and the corresponding expression data is the aggrieved emotion expression data. When the state determination result is the right-leaning state, the limb data is used to drive the robot's other forelimb to swing up and down, and to drive the other ear structure to swing crosswise, and the corresponding expression data is aggrieved emotion expression data.
[0011] According to a robot control method provided by the present invention, controlling the robot to execute the behavioral data includes: The tilting direction of the robot is determined based on the state determination result, and a reset limb action corresponding to the tilting direction is determined based on the tilting direction; wherein, the reset limb action is used to drive the limb structure to apply force to the contact surface, so as to assist the robot in restoring from the tilted state to the normal posture; Control the robot to execute the limb data, and control the robot to perform the limb reset action.
[0012] According to a robot control method provided by the present invention, after controlling the robot to perform the repositioning limb action, the method further includes: The robot's posture data is acquired again to obtain the posture data after reset; When the reset posture data still meets the judgment condition corresponding to any of the abnormal states, the amplitude or number of times the reset limb action is executed is adjusted to obtain the adjusted reset limb action, and the robot is controlled to execute the adjusted reset limb action. When the reset posture data meets the normal posture conditions, the reset limb action is stopped.
[0013] According to a robot control method provided by the present invention, the multiple abnormal states also include an inverted state, a picked-up state, a put-down state, and a shaking state; The step of matching the attitude data with preset abnormal state determination conditions to obtain a state determination result further includes: When the angle at which the robot rotates around the first coordinate axis or the second coordinate axis is within the second set angle range, it is determined that the robot is in the inverted state, and the lower limit of the second set angle range is greater than the upper limit of the first set angle range; When the upward acceleration in the acceleration data exceeds a preset acceleration threshold, the robot is determined to be in the picked-up state. When the robot switches from the picked-up state to a state where the acceleration data no longer exceeds the preset acceleration threshold and continues for the preset duration, the robot is determined to be in the put-down state. When the acceleration data indicates that the robot is in a reciprocating swaying state and continues for the preset duration, it is determined that the robot is in the swaying state.
[0014] According to a robot control method provided by the present invention, the step of determining behavioral data matching the corresponding abnormal state based on the state determination result further includes: When the state determination result is the inverted state, the facial expression data is irritable emotional expression data, and the corresponding limb data is used to drive the robot's two forelimbs to swing in a cross manner. When the state determination result is the picked-up state, the facial expression data is panic expression data, and the corresponding limb data is used to drive the limb structure to present a struggling action; When the state determination result is the put-down state, the expression data is smiling emotional expression data, and the corresponding limb data is used to drive the limb structure to swing up and down. When the state determination result is the shaking state, the facial expression data is dizziness expression data, and the corresponding limb data is used to drive the robot's ear structure to swing rapidly.
[0015] According to a robot control method provided by the present invention, acquiring robot posture data includes: The robot's rotation angle data around the first coordinate axis and the second coordinate axis are obtained by an attitude sensor installed on the robot. The robot's acceleration data is obtained by using an accelerometer sensor installed on the robot.
[0016] According to a robot control method provided by the present invention, the step of matching the posture data with preset abnormal state determination conditions to obtain a state determination result further includes: If the duration for which the attitude data satisfies the judgment condition corresponding to any of the abnormal states does not reach the preset duration, the attitude data is determined to be jitter, and the behavior data corresponding to any of the abnormal states is not triggered.
[0017] A robot control method provided by the present invention further includes: When the rotation angle of the robot around the first coordinate axis and the rotation angle around the second coordinate axis are both within the angle range defined by the normal posture conditions, it is determined that the robot is in a normal driving state, and the robot is controlled to execute normal behavior data corresponding to the normal driving state. Wherein, the upper limit of the angle range defined by the normal posture conditions is less than the lower limit of the first set angle range.
[0018] The present invention also provides a robot control device, applied to a robot, comprising: The data acquisition module is used to acquire the robot's posture data; wherein, the posture data includes the robot's rotation angle data relative to a reference coordinate system and the robot's acceleration data, the reference coordinate system is a coordinate system established with the robot body as a reference and containing multiple mutually perpendicular coordinate axes, and the rotation angle data is the angle by which the robot rotates around at least one of the multiple coordinate axes. The state determination module is used to match the posture data with preset abnormal state determination conditions to obtain a state determination result; wherein, the abnormal state determination conditions include angle interval conditions and acceleration conditions corresponding to various abnormal states respectively, and the state determination result is used to indicate the abnormal state of the robot from the various abnormal states. The behavior decision module is used to determine behavior data matching the corresponding abnormal state based on the state determination result when the state determination result indicates that the robot is in any of the abnormal states; wherein, the behavior data includes facial expression data for driving the display component to present anthropomorphic emotions, and limb data for driving the robot's limb structure to perform movements. The execution control module is used to control the robot to execute the behavioral data.
[0019] The present invention also provides a robot, including an attitude sensor, an acceleration sensor, a display component, a movable limb structure, a memory, and a processor; The attitude sensor is used to collect the rotation angle data of the robot relative to the reference coordinate system, and the acceleration sensor is used to collect the acceleration data of the robot. The reference coordinate system is a coordinate system established with the robot body as the reference and containing multiple mutually perpendicular coordinate axes. The memory stores a computer program, which, when executed by the processor, implements any of the robot control methods described above.
[0020] The present invention also provides an electronic device, 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 robot control method described above.
[0021] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the robot control method as described above.
[0022] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the robot control method as described above.
[0023] This invention provides a robot control method and apparatus. By acquiring the robot's rotation angle data and acceleration data relative to a reference coordinate system, and matching the posture data with preset abnormal state judgment conditions including angle range conditions and acceleration conditions, the method can accurately identify the robot's current abnormal state from multiple abnormal states. Furthermore, based on the state judgment result, it determines behavioral data matching the corresponding abnormal state, including facial expression data and body language data, and controls the robot to execute the behavioral data. This allows the robot to exhibit human-like emotions and body movements appropriate to different abnormal states. Compared to the single and rigid voice alarm method in the prior art, this application makes the robot's feedback in abnormal states more vivid, natural, and targeted. It not only facilitates users' intuitive perception of the robot's current state but also effectively enhances the human-likeness and interactive fun of the robot's performance in abnormal states, improving the user experience. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0025] Figure 1This is a flowchart illustrating the robot control method provided by the present invention; Figure 2 This is a schematic diagram of the reference coordinate system provided by the present invention; Figure 3 The robot control device provided by the present invention.
[0026] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0028] The robot control methods provided in the various embodiments of the present invention can be executed by a controller, processor or control system installed inside the robot, or by an electronic device with data processing capabilities such as a server or mobile terminal that is connected to the robot for communication.
[0029] For ease of explanation, the following embodiments are described using a controller located inside the robot as the execution subject, but this does not constitute a limitation on the execution subject.
[0030] The robots mentioned in the various embodiments of the present invention can be intelligent interactive devices with movement functions and movable limb structures, such as child companion robots, pet robots, or electronic pets.
[0031] Figure 1 This is a flowchart illustrating the robot control method provided by the present invention, as shown below. Figure 1 As shown, this robot control method is applied to a robot and includes the following processing steps: Step 101: Obtain the robot's posture data; wherein, the posture data includes the robot's rotation angle data relative to a reference coordinate system and the robot's acceleration data, the reference coordinate system is a coordinate system established with the robot body as a reference and containing multiple mutually perpendicular coordinate axes, and the rotation angle data is the angle by which the robot rotates around at least one of the multiple coordinate axes. In this application, attitude data is used to reflect the actual pose state of the robot in space, including the rotation angle data of the robot relative to the reference coordinate system and the acceleration data of the robot.
[0032] Figure 2This is a schematic diagram of the reference coordinate system provided by the present invention, such as... Figure 2 As shown, the reference coordinate system is established with the robot body as the reference and contains multiple mutually perpendicular coordinate axes. That is to say, this reference coordinate system moves together with the robot body, and the origin of the coordinate system can be set at the geometric center, center of mass, or sensor mounting position of the robot body, etc.
[0033] Multiple coordinate axes can be two mutually perpendicular coordinate axes or three mutually perpendicular coordinate axes. The rotation angle data is the angle by which the robot rotates around at least one of the multiple coordinate axes, such as the angle by which the robot rotates around a single coordinate axis, or the composite angle formed by the robot rotating around two or more coordinate axes simultaneously.
[0034] There are various ways for the controller to acquire attitude data. In one method, the controller reads the data directly output by the sensors installed on the robot body; in another method, the controller preprocesses the raw data output by the sensors by filtering, fusing, or performing coordinate transformations to obtain the attitude data. In a normal upright posture, the robot's rotation angle data is relatively small, and the acceleration data shows no significant fluctuations.
[0035] Step 102: Match the posture data with preset abnormal state determination conditions to obtain a state determination result; wherein, the abnormal state determination conditions include angle interval conditions and acceleration conditions corresponding to various abnormal states respectively, and the state determination result is used to indicate the abnormal state of the robot from the various abnormal states. In this application, the abnormal state determination conditions are used to define various abnormal situations in which the robot deviates from its normal pose. These abnormal state determination conditions include angle interval conditions and acceleration conditions corresponding to each of the various abnormal states.
[0036] Angle range conditions can be understood as the angle range set for rotation angle data, while acceleration conditions can be understood as the numerical or variation conditions set for acceleration data.
[0037] Various abnormal states can include situations where the robot is stuck by a foreign object, is lifted into the air, tilts, or shakes. When the robot is in any of these situations, its rotation angle or acceleration data will deviate from the normal range.
[0038] More specifically, the controller compares the acquired rotation angle data and acceleration data with the angle interval conditions and acceleration conditions corresponding to each abnormal state. When the posture data falls within the condition range corresponding to a certain abnormal state, it is determined that the robot is currently in that abnormal state.
[0039] The state determination result is used to indicate the current abnormal state of the robot from a variety of abnormal states. Its form can be a state identifier, state code, or state name, etc.
[0040] Step 103: When the state determination result indicates that the robot is in any of the abnormal states, determine the behavioral data that matches the corresponding abnormal state according to the state determination result; wherein, the behavioral data includes facial expression data for driving the display component to present anthropomorphic emotions, and limb data for driving the robot's limb structure to perform movements. In this application, behavioral data is used to drive the robot to make human-like reactions and behaviors, including facial expression data and body language data. Facial expression data is used to drive the robot's display components to display human-like emotions. The display components can be a display screen, a dot matrix screen, or a display array composed of light-emitting elements placed on the robot's face. The human-like emotions displayed can include emotional expressions such as grievance, irritability, panic, smile, and dizziness.
[0041] Limb data is used to drive the robot's limb structure to perform movements. The limb structure can include movable parts such as the robot's forelimbs, arms, and ear structures.
[0042] The controller can pre-establish a mapping relationship between abnormal states and behavioral data and store it in memory. When an abnormal state of the robot is determined, the controller uses this mapping relationship to find the facial expression data and body language data corresponding to the current abnormal state.
[0043] Step 104: Control the robot to execute the behavioral data so that the robot exhibits human-like behavior in the abnormal state.
[0044] The controller sends behavioral data to the display components and the corresponding drive mechanisms of the limb structure. The display components present the corresponding expressions, and the limb structure performs the corresponding actions, thus enabling the robot to exhibit human-like behavior in abnormal states.
[0045] In this application, by establishing a correspondence between abnormal states and behavioral data including facial expression data and body data, the robot can exhibit vivid and lifelike human-like reactions when in an abnormal state, which effectively improves the human-likeness of the robot's performance in abnormal states and overcomes the problem of simple and rigid responses caused by relying solely on voice alarms in related technologies.
[0046] Optionally, the reference coordinate system includes a first coordinate axis, a second coordinate axis, and a third coordinate axis that are perpendicular to each other; Wherein, the third coordinate axis is vertical when the robot is in a normal upright posture, and the first and second coordinate axes are located in the horizontal plane when the robot is in a normal upright posture; the rotation of the robot around the first coordinate axis represents the robot's forward and backward tilting, and the rotation of the robot around the second coordinate axis represents the robot's left and right tilting.
[0047] The reference coordinate system includes three mutually perpendicular coordinate axes: a first axis, a second axis, and a third axis, forming a three-dimensional rectangular coordinate system, which can be combined with... Figure 2 The robot reference coordinate system shown is used for understanding.
[0048] For ease of understanding, the correspondence between each coordinate axis and the robot's posture can be set as follows: The third coordinate axis is vertical when the robot is in a normal upright posture, and the first and second coordinate axes are located in the horizontal plane when the robot is in a normal upright posture.
[0049] Under this setting, the robot's rotation around the first coordinate axis can represent the robot's forward and backward tilting, and the robot's rotation around the second coordinate axis can represent the robot's left and right tilting.
[0050] For example, when the robot's head is tilted forward, the robot body rotates in one direction around the first coordinate axis; when the robot tilts to the left, the robot body rotates in one direction around the second coordinate axis. Based on the robot's rotation angles around the first and second coordinate axes, the controller can distinguish whether the robot is tilting forward / backward or left / right.
[0051] This implementation method clarifies the physical meaning of each of the three mutually perpendicular coordinate axes, providing a clear judgment criterion for distinguishing abnormal states in different directions and improving the accuracy of abnormal state judgment.
[0052] Optionally, the various abnormal states include a forward-leaning state, a backward-leaning state, a left-leaning state, and a right-leaning state; the posture data is matched with preset abnormal state judgment conditions to obtain a state judgment result, including: When the robot rotates around the first coordinate axis in the first rotation direction at an angle within a first set angle range and continues for a preset duration, it is determined that the robot is in the forward-leaning state. When the robot rotates around the first coordinate axis in a second rotation direction opposite to the first rotation direction by an angle within the first set angle range, and continues to do so for the preset duration, it is determined that the robot is in the backward tilt state. When the robot rotates around the second coordinate axis in the first rotation direction at an angle within the first set angle range and continues for the preset duration, it is determined that the robot is in the left tilting state. When the robot rotates around the second coordinate axis in the second rotation direction at an angle within the first set angle range and continues for the preset duration, it is determined that the robot is in the right tilting state. The corresponding state determination result is generated based on the forward leaning state, the backward leaning state, the left leaning state, and the right leaning state.
[0053] Specifically, when the robot rotates around the first coordinate axis in the first rotation direction at an angle within a first preset angle range, and this rotation continues for a preset duration, the controller determines that the robot is in a forward-leaning state. The first rotation direction can be a counter-clockwise direction around the first coordinate axis.
[0054] This embodiment further refines the tilting state and its determination process among various abnormal states. These abnormal states include forward tilting, backward tilting, left tilting, and right tilting. For ease of description, the term "tilting state" is retained. Figure 2 The reference coordinate system shown uses the robot's rotation around the first coordinate axis to represent forward and backward tilting, and the robot's rotation around the second coordinate axis to represent left and right tilting.
[0055] Before making a judgment, the controller first determines the rotation direction setting. Rotation around the same coordinate axis can be divided into two types with opposite directions. In this embodiment, one type is defined as the first rotation direction and the other as the second rotation direction.
[0056] For example, the counter-clockwise direction around the first coordinate axis can be defined as the first rotation direction, and the clockwise direction as the second rotation direction. Thus, the numerical value of the rotation angle alone is insufficient to determine the tipping situation; the rotation direction must also be considered, and both must be combined to define the robot's specific tipping state.
[0057] In practical applications, the first set angle range can be set to 40 to 90 degrees, and the preset duration can be set to one second. That is, when the robot's head is lowered forward, the body rotates counterclockwise around the first coordinate axis, and the rotation angle falls between 40 and 90 degrees, and is maintained for one second, the controller recognizes that the robot has entered the forward-lying state.
[0058] In actual debugging, the lower limit of the first set angle range can also be adjusted from 40 degrees to other values, such as 60 degrees, to adapt to different sensitivity triggering effects, while the upper limit can be kept at 90 degrees.
[0059] For the backward tilt state, when the robot rotates around the first coordinate axis in the second rotation direction opposite to the first rotation direction by an angle within the first set angle range and continues for a preset duration, the controller determines that the robot is in the backward tilt state.
[0060] The second rotation direction can be clockwise around the first coordinate axis. The backward tilting state and the forward tilting state revolve around the same coordinate axis and share the same first set angle range. The difference between the two is that their rotation directions are opposite.
[0061] For example, when the robot tilts backward and rotates clockwise around the first coordinate axis to an angle between 40 and 90 degrees and holds this position for one second, the controller determines that the robot has entered a backward tilting state.
[0062] For the left-tilting state, when the robot rotates around the second coordinate axis in the first rotation direction at an angle within the first set angle range and continues for a preset duration, the controller determines that the robot is in the left-tilting state.
[0063] For the right-tilting state, when the robot rotates around the second coordinate axis in the second rotation direction at an angle within the first set angle range and continues for a preset duration, the controller determines that the robot is in the right-tilting state.
[0064] The left-tilting state and the right-tilting state revolve around the same second coordinate axis and share the same first set angle range. The difference between the two is that the rotation direction is opposite, corresponding to the two situations where the robot tilts to the left and to the right, respectively.
[0065] As can be seen above, the forward-leaning and backward-leaning states correspond to two opposite rotation directions around the first coordinate axis, and the left-leaning and right-leaning states correspond to two opposite rotation directions around the second coordinate axis. The four leaning states share the same first set angle range and are distinguished only by the coordinate axis around which the rotation is located and the direction of rotation, which facilitates rapid comparison by the controller.
[0066] The purpose of setting a preset duration is to prevent shaking. During movement, the robot may experience brief attitude fluctuations due to road bumps, instantaneous collisions, etc. If the response is not discriminated, it can easily lead to frequent false triggers.
[0067] By judging the preset time, the controller only determines that the robot has entered the corresponding tilting state if the state that meets the angle range condition and the rotation direction condition is maintained for the preset time. For example, if the robot rotates counterclockwise around the first coordinate axis at an angle between 40 and 90 degrees, but only maintains this angle for a fraction of a second before returning to normal, the controller will not determine that it has entered the forward-leaning state.
[0068] Ultimately, the controller generates corresponding state determination results based on the forward-leaning, backward-leaning, left-leaning, and right-leaning states, which are then used to determine subsequent behavioral data.
[0069] This implementation associates the tilting direction with angle ranges around different coordinate axes and rotation directions, and introduces duration determination. It can accurately distinguish four tilting situations of the robot: forward tilting, backward tilting, left tilting, and right tilting, while sharing the same angle range. At the same time, it effectively suppresses false triggering caused by instantaneous posture fluctuations.
[0070] Optionally, determining the behavioral data matching the corresponding abnormal state based on the state determination result includes: When the state determination result is the forward-lying state, the limb data is used to drive the robot's ear structure to swing in a cross manner and drive one side of the limb to strike the contact surface. When the state determination result is the backward state, the limb data is used to drive the robot's two forelimbs to swing in a cross motion, and the corresponding facial expression data is the data of a wronged emotional expression. When the state determination result is the left tilt state, the limb data is used to drive the robot's one side forelimb to swing up and down and drive the ear structure on the same side to swing in a cross manner, and the corresponding expression data is the aggrieved emotion expression data. When the state determination result is the right-leaning state, the limb data is used to drive the robot's other forelimb to swing up and down, and to drive the other ear structure to swing crosswise, and the corresponding expression data is aggrieved emotion expression data.
[0071] In this application, for the forward-leaning state, limb data is used to drive the robot's ear structure to swing crosswise and drive one side of the limb to strike the contact surface.
[0072] Specifically, the controller sends commands to the drive mechanism corresponding to the ear structure, causing the two ear structures to swing back and forth in a cross pattern; on the other hand, it controls the robot's arm on one side to tap the contact surface downwards, and the number of taps can be set to two.
[0073] The contact surface can be the ground or the surface of the object the robot is leaning against. By combining the cross-swinging of its ears with the light tapping of its arms on the ground, the robot simulates the anthropomorphic reaction of lying on the ground and tapping the ground, making the originally stiff tilting state vivid and expressive.
[0074] In the backward tilting position, limb data is used to drive the robot's two forelimbs to swing in a crisscross motion, and the corresponding facial expression data is data of a wronged emotional expression.
[0075] The controller sends commands to the drive mechanisms corresponding to the two forelimbs, causing the forelimbs to swing in a crisscross motion. At the same time, the display components on the robot's face display a distressed expression. The crisscrossing of the forelimbs, combined with the distressed expression, simulates the anthropomorphic reaction of the robot falling backward and feeling aggrieved.
[0076] For the left-leaning state, limb data is used to drive the robot's one-sided forelimb to swing up and down, and to drive the ipsilateral ear structure to swing crosswise. The corresponding facial expression data is data of aggrieved emotions.
[0077] For example, when the robot tilts to the left, the controller drives the robot's forelimbs close to the tilting side to swing up and down, while simultaneously driving the ear structure on the same side to swing crosswise, and causing the display to show a distressed expression.
[0078] In the right-tilting state, limb data is used to drive the robot's other forelimb to swing up and down, and to drive the other ear structure to swing crosswise. The corresponding facial expression data is data of a wronged emotional expression. The right-tilting state corresponds to the left-tilting state, the difference being that the movement occurs on the other side of the robot.
[0079] For example, when the robot tilts to the right, the controller drives the forelimb on the opposite side of the tilt to swing up and down, and drives the ear structure on that side to swing crosswise, which is also accompanied by a wronged expression.
[0080] As can be seen from the above, the left-tilting state and the right-tilting state are consistent in terms of facial expression data, both showing a feeling of grievance. However, in terms of body data, they are applied to different sides of the robot, so that the robot exhibits a directional, anthropomorphic response in the two tilting states.
[0081] The robot is equipped with data on aggrieved emotional expressions for its backward, left-leaning, and right-leaning states, which match the emotions it should express when it falls or tilts to the side. In the forward-leaning state, the robot mainly uses ear swaying combined with arm patting the ground to present a playful and agile response.
[0082] After determining the above facial expression data and limb data, the controller sends the facial expression data to the display component and the limb data to the drive mechanism of the corresponding limb structure. The display component and the limb structure execute synchronously, so that the robot presents a unique anthropomorphic performance in different tilting states.
[0083] This implementation assigns specific facial expressions and body movements to each tilting state—forward, backward, left, and right—and distinguishes the side of the robot affected by the movement while maintaining emotional consistency when tilting left and right. This allows the robot to exhibit anthropomorphic responses that fit its posture, are emotionally expressive, and have directional differentiation when tilting.
[0084] Optionally, controlling the robot to execute the behavioral data includes: The tilting direction of the robot is determined based on the state determination result, and a reset limb action corresponding to the tilting direction is determined based on the tilting direction; wherein, the reset limb action is used to drive the limb structure to apply force to the contact surface, so as to assist the robot in restoring from the tilted state to the normal posture; Control the robot to execute the limb data, and control the robot to perform the limb reset action.
[0085] In this application, the controller determines a reset limb action corresponding to the tilting direction. The reset limb action is used to drive the limb structure to apply force to the contact surface, thereby assisting the robot in restoring itself from a tilted state to a normal posture.
[0086] For example, when the robot falls forward, the controller drives the robot's arms to push down and backward against the ground, using the reaction force from the arms to straighten the robot. When the robot tilts to the left, the controller drives the robot's left limbs to brace against the ground, lifting the robot to the right and helping it return to its normal position. For different tilting directions, the controller controls the corresponding limbs to perform different pushing actions.
[0087] Subsequently, the controller directs the robot to execute limb data and perform a limb reset action. In this way, the robot not only exhibits human-like emotions and movements, but can also actively push against the contact surface using its limb structure to assist in its self-alignment.
[0088] This implementation calculates the corresponding repositioning limb actions based on the tilting direction, enabling the robot to actively recover its posture by utilizing its limb structure while exhibiting human-like behavior, thus improving the robot's practicality in dealing with abnormal tilting conditions.
[0089] Optionally, after controlling the robot to perform the repositioning limb action, the method further includes: The robot's posture data is acquired again to obtain the posture data after reset; When the reset posture data still meets the judgment condition corresponding to any of the abnormal states, the amplitude or number of times the reset limb action is executed is adjusted to obtain the adjusted reset limb action, and the robot is controlled to execute the adjusted reset limb action. When the reset posture data meets the normal posture conditions, the reset limb action is stopped.
[0090] In this application, the method of obtaining the post-reset posture data is the same as the method of obtaining posture data described above, and is used to reflect the actual pose of the robot after performing the reset limb action.
[0091] If the posture data after reset still meets the judgment condition corresponding to any abnormal state, it indicates that the robot has not yet returned to the normal posture. At this time, the controller adjusts the amplitude or number of executions of the reset limb action to obtain the adjusted reset limb action, and controls the robot to execute the adjusted reset limb action. For example, the controller increases the amplitude of the arm push or increases the number of push actions to provide greater return-to-center assistance. This adjustment and re-execution process can be repeated until the robot returns to the normal posture.
[0092] When the posture data after reset meets the normal posture conditions, it indicates that the robot has returned to the normal posture, and the controller stops executing the reset limb action.
[0093] This implementation method performs a secondary determination on the posture data after reset, and dynamically adjusts the amplitude or number of resetting limb movements accordingly to form a closed-loop feedback control for posture recovery, thereby improving the success rate and reliability of the robot's self-reset.
[0094] Optionally, the various abnormal states also include an upside-down state, a picked-up state, a put-down state, and a shaking state; The step of matching the attitude data with preset abnormal state determination conditions to obtain a state determination result further includes: When the angle at which the robot rotates around the first coordinate axis or the second coordinate axis is within the second set angle range, it is determined that the robot is in the inverted state, and the lower limit of the second set angle range is greater than the upper limit of the first set angle range; When the upward acceleration in the acceleration data exceeds a preset acceleration threshold, the robot is determined to be in the picked-up state. When the robot switches from the picked-up state to a state where the acceleration data no longer exceeds the preset acceleration threshold and continues for the preset duration, the robot is determined to be in the put-down state. When the acceleration data indicates that the robot is in a reciprocating swaying state and continues for the preset duration, it is determined that the robot is in the swaying state.
[0095] This embodiment further supplements various abnormal states, which also include the inverted state, the picked-up state, the put-down state, and the shaking state.
[0096] When the robot rotates around the first or second coordinate axis at an angle within the second preset angle range, the controller determines that the robot is in an upside-down state. The lower limit of the second preset angle range is greater than the upper limit of the first preset angle range. In practical applications, when the first preset angle range is 40 to 90 degrees, the second preset angle range can be set to a range greater than 90 degrees and not exceeding 180 degrees to represent the situation where the robot body is flipped over.
[0097] When the upward acceleration in the acceleration data exceeds a preset acceleration threshold, the controller determines that the robot is in a picked-up state. This corresponds to the process of the robot being lifted upwards by the user; a significant upward acceleration occurs the instant the robot is lifted into the air.
[0098] When the robot transitions from a picked-up state to a state where the acceleration data does not exceed a preset acceleration threshold and remains unchanged for a preset duration, the controller determines that the robot is in a put-down state. This corresponds to the process where the robot's posture tends to stabilize after being placed back down from a picked-up state.
[0099] When the acceleration data indicates that the robot is in a reciprocating swaying state for a preset duration, the controller determines that the robot is in a swaying state. Reciprocating swaying can be manifested as the acceleration data changing repeatedly in opposite directions.
[0100] This implementation method, by supplementing various abnormal state judgments based on angle ranges and acceleration conditions, enables the robot to recognize a wider range of abnormal situations such as being upside down, being picked up, being put down, and being shaken, thus expanding the applicable scenarios for anthropomorphic performance.
[0101] Optionally, determining the behavioral data matching the corresponding abnormal state based on the state determination result further includes: When the state determination result is the inverted state, the facial expression data is irritable emotional expression data, and the corresponding limb data is used to drive the robot's two forelimbs to swing in a cross manner. When the state determination result is the picked-up state, the facial expression data is panic expression data, and the corresponding limb data is used to drive the limb structure to present a struggling action; When the state determination result is the put-down state, the expression data is smiling emotional expression data, and the corresponding limb data is used to drive the limb structure to swing up and down. When the state determination result is the shaking state, the facial expression data is dizziness expression data, and the corresponding limb data is used to drive the robot's ear structure to swing rapidly.
[0102] In this application, when the state determination result is an inverted state, the facial expression data is irritable emotional expression data, and the corresponding limb data is used to drive the robot's two forelimbs to swing in a cross manner, simulating the anthropomorphic reaction of the robot being frantic and irritable when it is overturned.
[0103] When the state determination result is "picked up", the facial expression data is panicked expression data, and the corresponding limb data is used to drive the limb structure to present struggling movements, simulating the anthropomorphic reaction of the robot being lifted up in the air, such as fear of heights and struggling.
[0104] When the state determination result is "put down", the facial expression data is smiling emotional expression data, and the corresponding limb data is used to drive the limb structure to swing slightly up and down, simulating the human-like reaction of the robot returning to calm after getting rid of the lifted state.
[0105] When the state determination result is a shaking state, the facial expression data is dizzy emotional expression data, and the corresponding limb data is used to drive the robot's ear structure to swing rapidly, simulating the anthropomorphic reaction of the robot being shaken back and forth.
[0106] This implementation method assigns matching emotional expressions and body movements to each state of inversion, picking up, putting down, and shaking, enabling the robot to exhibit appropriate and vivid anthropomorphic responses in various abnormal situations.
[0107] Optionally, acquiring the robot's posture data includes: The robot's rotation angle data around the first coordinate axis and the second coordinate axis are obtained by an attitude sensor installed on the robot. The robot's acceleration data is obtained by using an accelerometer sensor installed on the robot.
[0108] In this application, the controller acquires the robot's rotational angle data around a first coordinate axis and a second coordinate axis through attitude sensors mounted on the robot. The attitude sensor can be a gyroscope, an angle sensor, or an attitude measurement unit composed of various inertial devices.
[0109] The controller acquires the robot's acceleration data through accelerometers mounted on the robot. The accelerometers can output the robot's acceleration in one or more directions.
[0110] In one implementation, the attitude sensor and the accelerometer can also be integrated into a single inertial measurement unit, with the controller reading and calculating the rotation angle data and acceleration data.
[0111] This embodiment provides a reliable data source for determining the aforementioned abnormal state by clearly specifying that rotation angle data and acceleration data are collected by attitude sensors and acceleration sensors, respectively.
[0112] Optionally, matching the attitude data with preset abnormal state determination conditions to obtain a state determination result further includes: If the duration for which the attitude data satisfies the judgment condition corresponding to any of the abnormal states does not reach the preset duration, the attitude data is determined to be jitter, and the behavior data corresponding to any of the abnormal states is not triggered.
[0113] If the duration for which the attitude data meets the judgment condition corresponding to any abnormal state does not reach the preset duration, the controller determines that the attitude data is jittering and does not trigger the behavior data corresponding to the abnormal state.
[0114] For example, if a robot experiences a momentary collision or slight shaking, causing its rotation angle data to briefly fall within the angle range corresponding to an abnormal state, but the duration is less than one second, the controller will interpret this as jitter and will not respond. In this case, the robot can avoid frequently triggering behavioral data due to momentary disturbances.
[0115] This implementation method effectively suppresses false triggering and improves the stability of abnormal state determination by judging and filtering out attitude data that has not reached the preset duration.
[0116] Optionally, when the rotation angle of the robot around the first coordinate axis and the rotation angle around the second coordinate axis are both within the angle range defined by the normal posture conditions, it is determined that the robot is in a normal driving state, and the robot is controlled to execute normal behavior data corresponding to the normal driving state. Wherein, the upper limit of the angle range defined by the normal posture conditions is less than the lower limit of the first set angle range.
[0117] In this application, when both the robot's rotation angle around the first coordinate axis and its rotation angle around the second coordinate axis are within the angle range defined by the normal posture conditions, the controller determines that the robot is in a normal driving state and controls the robot to execute normal behavioral data corresponding to the normal driving state. The upper limit of the angle range defined by the normal posture conditions is less than the lower limit of the first set angle range.
[0118] In practical applications, with the lower limit of the first set angle range being forty degrees, the angle range defined by the normal posture conditions can be set to the range of zero to forty degrees. When the robot rotates around both the first and second coordinate axes within the range of zero to forty degrees, it can be considered that the robot is in a normal driving situation such as driving on flat ground or going up or down a slope. At this time, the controller controls the robot to maintain the behavior corresponding to the normal driving state.
[0119] This implementation method defines the angle range limited by normal posture conditions, enabling the robot to distinguish between normal posture changes such as going uphill and downhill and abnormal tilting states, thus avoiding being misjudged as abnormal and triggering abnormal behavior data during normal driving.
[0120] The robot control device provided by the present invention is described below. The robot control device described below can be referred to in correspondence with the robot control method described above.
[0121] Figure 3 The robot control device provided by the present invention, such as Figure 3 As shown, it includes: The data acquisition module 310 is used to acquire the robot's posture data; wherein, the posture data includes the robot's rotation angle data relative to a reference coordinate system and the robot's acceleration data, the reference coordinate system is a coordinate system established with the robot body as a reference and containing multiple mutually perpendicular coordinate axes, and the rotation angle data is the angle by which the robot rotates around at least one of the multiple coordinate axes. The state determination module 320 is used to match the posture data with preset abnormal state determination conditions to obtain a state determination result; wherein, the abnormal state determination conditions include angle interval conditions and acceleration conditions corresponding to various abnormal states respectively, and the state determination result is used to indicate the abnormal state of the robot from the various abnormal states. The behavior decision module 330 is used to determine behavior data matching the corresponding abnormal state based on the state determination result when the state determination result indicates that the robot is in any of the abnormal states; wherein, the behavior data includes facial expression data for driving the display component to present anthropomorphic emotions, and limb data for driving the robot's limb structure to perform actions. The execution control module 340 is used to control the robot to execute the behavioral data.
[0122] This invention provides a robot, including an attitude sensor, an accelerometer, a display unit, a movable limb structure, a memory, and a processor. The attitude sensor is used to collect rotation angle data of the robot relative to a reference coordinate system, and the accelerometer is used to collect acceleration data of the robot. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned robot control method. The display unit is used to display anthropomorphic emotions, and the movable limb structure is used to perform limb movements under the control of the processor.
[0123] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a robot control method, which includes: acquiring robot posture data; wherein the posture data includes rotation angle data of the robot relative to a reference coordinate system and acceleration data of the robot, the reference coordinate system being a coordinate system established with the robot body as a reference and containing multiple mutually perpendicular coordinate axes, and the rotation angle data being the angle by which the robot rotates around at least one of the multiple coordinate axes; The posture data is matched with preset abnormal state determination conditions to obtain a state determination result; wherein, the abnormal state determination conditions include angle interval conditions and acceleration conditions corresponding to various abnormal states respectively, and the state determination result is used to indicate the abnormal state of the robot from the various abnormal states. When the state determination result indicates that the robot is in any of the abnormal states, behavioral data matching the corresponding abnormal state is determined according to the state determination result; wherein, the behavioral data includes facial expression data for driving the display component to present anthropomorphic emotions, and limb data for driving the robot's limb structure to perform movements. The robot is controlled to execute the behavioral data so that it exhibits human-like behavior in the abnormal state.
[0124] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0125] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the robot control method provided by the above methods. The method includes acquiring robot posture data; wherein the posture data includes rotation angle data of the robot relative to a reference coordinate system and acceleration data of the robot, the reference coordinate system is a coordinate system established with the robot body as a reference and including multiple mutually perpendicular coordinate axes, and the rotation angle data is the angle by which the robot rotates around at least one of the multiple coordinate axes. The posture data is matched with preset abnormal state determination conditions to obtain a state determination result; wherein, the abnormal state determination conditions include angle interval conditions and acceleration conditions corresponding to various abnormal states respectively, and the state determination result is used to indicate the abnormal state of the robot from the various abnormal states. When the state determination result indicates that the robot is in any of the abnormal states, behavioral data matching the corresponding abnormal state is determined according to the state determination result; wherein, the behavioral data includes facial expression data for driving the display component to present anthropomorphic emotions, and limb data for driving the robot's limb structure to perform movements. The robot is controlled to execute the behavioral data so that it exhibits human-like behavior in the abnormal state.
[0126] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the robot control method provided by the above methods. The method includes: acquiring robot posture data; wherein the posture data includes rotation angle data of the robot relative to a reference coordinate system and acceleration data of the robot, the reference coordinate system being a coordinate system established with the robot body as a reference and including multiple mutually perpendicular coordinate axes, and the rotation angle data being the angle by which the robot rotates around at least one of the multiple coordinate axes; The posture data is matched with preset abnormal state determination conditions to obtain a state determination result; wherein, the abnormal state determination conditions include angle interval conditions and acceleration conditions corresponding to various abnormal states respectively, and the state determination result is used to indicate the abnormal state of the robot from the various abnormal states. When the state determination result indicates that the robot is in any of the abnormal states, behavioral data matching the corresponding abnormal state is determined according to the state determination result; wherein, the behavioral data includes facial expression data for driving the display component to present anthropomorphic emotions, and limb data for driving the robot's limb structure to perform movements. The robot is controlled to execute the behavioral data so that it exhibits human-like behavior in the abnormal state.
[0127] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A robot control method, characterized in that, Applications in robots, including: Acquire robot posture data; wherein, the posture data includes the rotation angle data of the robot relative to a reference coordinate system and the acceleration data of the robot, the reference coordinate system is a coordinate system established with the robot body as a reference and containing multiple mutually perpendicular coordinate axes, and the rotation angle data is the angle by which the robot rotates around at least one of the multiple coordinate axes. The posture data is matched with preset abnormal state determination conditions to obtain a state determination result; wherein, the abnormal state determination conditions include angle interval conditions and acceleration conditions corresponding to various abnormal states respectively, and the state determination result is used to indicate the abnormal state of the robot from the various abnormal states. When the state determination result indicates that the robot is in any of the abnormal states, behavioral data matching the corresponding abnormal state is determined according to the state determination result; wherein, the behavioral data includes facial expression data for driving the display component to present anthropomorphic emotions, and limb data for driving the robot's limb structure to perform movements. The robot is controlled to execute the behavioral data so that it exhibits human-like behavior in the abnormal state.
2. The robot control method according to claim 1, characterized in that, The reference coordinate system includes a first coordinate axis, a second coordinate axis, and a third coordinate axis that are perpendicular to each other; Wherein, the third coordinate axis is vertical when the robot is in a normal upright posture, and the first and second coordinate axes are located in the horizontal plane when the robot is in a normal upright posture; the rotation of the robot around the first coordinate axis represents the robot's forward and backward tilting, and the rotation of the robot around the second coordinate axis represents the robot's left and right tilting.
3. The robot control method according to claim 2, characterized in that, The various abnormal states include forward-leaning state, backward-leaning state, left-leaning state, and right-leaning state; The attitude data is matched with preset abnormal state determination conditions to obtain a state determination result, including: When the robot rotates around the first coordinate axis in the first rotation direction at an angle within a first set angle range and continues for a preset duration, it is determined that the robot is in the forward-leaning state. When the robot rotates around the first coordinate axis in a second rotation direction opposite to the first rotation direction by an angle within the first set angle range, and continues to do so for the preset duration, it is determined that the robot is in the backward tilt state. When the robot rotates around the second coordinate axis in the first rotation direction at an angle within the first set angle range and continues for the preset duration, it is determined that the robot is in the left tilting state. When the robot rotates around the second coordinate axis in the second rotation direction at an angle within the first set angle range and continues for the preset duration, it is determined that the robot is in the right tilting state. The corresponding state determination result is generated based on the forward leaning state, the backward leaning state, the left leaning state, and the right leaning state.
4. The robot control method according to claim 3, characterized in that, The step of determining the behavioral data matching the corresponding abnormal state based on the state determination result includes: When the state determination result is the forward-lying state, the limb data is used to drive the robot's ear structure to swing in a cross manner and drive one side of the limb to strike the contact surface. When the state determination result is the backward state, the limb data is used to drive the robot's two forelimbs to swing in a cross manner, and the corresponding facial expression data is the data of a wronged emotional expression. When the state determination result is the left tilt state, the limb data is used to drive the robot's one side forelimb to swing up and down and drive the ear structure on the same side to swing in a cross manner, and the corresponding expression data is the aggrieved emotion expression data. When the state determination result is the right-leaning state, the limb data is used to drive the robot's other forelimb to swing up and down, and to drive the other ear structure to swing crosswise, and the corresponding facial expression data is aggrieved emotional expression data.
5. The robot control method according to claim 3, characterized in that, The control of the robot to execute the behavioral data includes: The tilting direction of the robot is determined based on the state determination result, and a reset limb action corresponding to the tilting direction is determined based on the tilting direction; wherein, the reset limb action is used to drive the limb structure to apply force to the contact surface, so as to assist the robot in restoring from the tilted state to the normal posture; Control the robot to execute the limb data, and control the robot to perform the limb reset action.
6. The robot control method according to claim 5, characterized in that, After controlling the robot to perform the limb reset action, the method further includes: The robot's posture data is acquired again to obtain the posture data after reset; When the reset posture data still meets the judgment condition corresponding to any of the abnormal states, the amplitude or number of times the reset limb action is adjusted to obtain the adjusted reset limb action, and the robot is controlled to execute the adjusted reset limb action. When the reset posture data meets the normal posture conditions, the reset limb action is stopped.
7. The robot control method according to claim 3, characterized in that, The various abnormal states also include the inverted state, the picked-up state, the put-down state, and the shaking state; The step of matching the attitude data with preset abnormal state determination conditions to obtain a state determination result further includes: When the angle at which the robot rotates around the first coordinate axis or the second coordinate axis is within the second set angle range, it is determined that the robot is in the inverted state, and the lower limit of the second set angle range is greater than the upper limit of the first set angle range; When the upward acceleration in the acceleration data exceeds a preset acceleration threshold, the robot is determined to be in the picked-up state. When the robot switches from the picked-up state to a state where the acceleration data no longer exceeds the preset acceleration threshold and continues for the preset duration, the robot is determined to be in the put-down state. When the acceleration data indicates that the robot is in a reciprocating swaying state and continues for the preset duration, it is determined that the robot is in the swaying state.
8. The robot control method according to claim 7, characterized in that, The step of determining the behavioral data matching the corresponding abnormal state based on the state determination result further includes: When the state determination result is the inverted state, the facial expression data is irritable emotional expression data, and the corresponding limb data is used to drive the robot's two forelimbs to swing in a cross manner. When the state determination result is the picked-up state, the facial expression data is panic expression data, and the corresponding limb data is used to drive the limb structure to present a struggling action; When the state determination result is the put-down state, the expression data is smiling emotional expression data, and the corresponding limb data is used to drive the limb structure to swing up and down. When the state determination result is the shaking state, the facial expression data is dizziness expression data, and the corresponding limb data is used to drive the robot's ear structure to swing rapidly.
9. The robot control method according to claim 2, characterized in that, The acquisition of the robot's posture data includes: The robot's rotation angle data around the first coordinate axis and the second coordinate axis are obtained by an attitude sensor installed on the robot. The robot's acceleration data is obtained by using an accelerometer sensor installed on the robot.
10. The robot control method according to claim 3, characterized in that, The process of matching the attitude data with preset abnormal state determination conditions to obtain a state determination result also includes: If the duration for which the attitude data satisfies the judgment condition corresponding to any of the abnormal states does not reach the preset duration, the attitude data is determined to be jitter, and the behavior data corresponding to any of the abnormal states is not triggered.
11. The robot control method according to claim 3, characterized in that, Also includes: When the rotation angle of the robot around the first coordinate axis and the rotation angle around the second coordinate axis are both within the angle range defined by the normal posture conditions, it is determined that the robot is in a normal driving state, and the robot is controlled to execute normal behavior data corresponding to the normal driving state. Wherein, the upper limit of the angle range defined by the normal posture conditions is less than the lower limit of the first set angle range.
12. A robot control device, characterized in that, Applications in robots, including: The data acquisition module is used to acquire the robot's posture data; wherein, the posture data includes the robot's rotation angle data relative to a reference coordinate system and the robot's acceleration data, the reference coordinate system is a coordinate system established with the robot body as a reference and containing multiple mutually perpendicular coordinate axes, and the rotation angle data is the angle by which the robot rotates around at least one of the multiple coordinate axes. The state determination module is used to match the posture data with preset abnormal state determination conditions to obtain a state determination result; wherein, the abnormal state determination conditions include angle interval conditions and acceleration conditions corresponding to various abnormal states respectively, and the state determination result is used to indicate the abnormal state of the robot from the various abnormal states. The behavior decision module is used to determine behavior data matching the corresponding abnormal state based on the state determination result when the state determination result indicates that the robot is in any of the abnormal states; wherein, the behavior data includes facial expression data for driving the display component to present anthropomorphic emotions, and limb data for driving the robot's limb structure to perform movements. An execution control module is used to control the robot to execute the behavioral data.
13. A robot, characterized in that, It includes attitude sensors, accelerometers, display components, movable limb structures, memory, and processors; The attitude sensor is used to collect the rotation angle data of the robot relative to the reference coordinate system, and the acceleration sensor is used to collect the acceleration data of the robot. The reference coordinate system is a coordinate system established with the robot body as the reference and containing multiple mutually perpendicular coordinate axes. The memory stores a computer program that, when executed by the processor, implements the robot control method according to any one of claims 1 to 11.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the robot control method as described in any one of claims 1 to 11.
15. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the robot control method as described in any one of claims 1 to 11.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the robot control method as described in any one of claims 1 to 11.