Robot control method, electronic equipment and readable storage medium
By obtaining and utilizing the dependencies and connection relationships between functional modules and peripherals in the robot for orderly control, the problem of low reliability of robot switch control in the prior art is solved, and higher system stability and data integrity are achieved sex.
Patent Information
- Application Number
- CN202411109839.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-10
AI Technical Summary
The existing robot switch control methods are low in reliability, and are prone to system initialization failure and data loss.
The driving control unit obtains the dependency relationship between functional modules and the connection relationship between peripherals and functional modules, and performs power-on and shutdown control according to these relationships to ensure the orderly start and shutdown of functional modules and peripherals, and performs safe shutdown detection and Data transfer.
It improves the reliability of robot switch control, avoids initialization failure and data loss, and ensures system stability and data integrity.
Smart Images

Figure CN119098953A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of robotics technology, and in particular, relates to a robot control method, electronic equipment, and readable storage medium. Background Art
[0002] A robot is an intelligent machine that can work semi-autonomously or fully autonomously, and can move to the work area to perform tasks through navigation. Currently, most robot power on and off control methods are controlled by a simple power switch, which is prone to system initialization failure when starting up and data loss when shutting down, and the reliability of power on and off control is low. Summary of the invention
[0003] The embodiments of the present application provide a robot control method, an electronic device, and a readable storage medium, which can solve the problem of low reliability of robot power on and off control in related technologies.
[0004] A first aspect of an embodiment of the present application provides a control method for a robot, wherein the robot is configured with a drive control unit, multiple functional modules connected to the drive control unit, and peripherals connected to the functional modules, and the control method comprises: when the drive control unit receives a power on / off control instruction, obtaining the dependency relationship between each of the functional modules and the connection relationship between the peripherals and the functional modules; and controlling the drive control unit to control each of the functional modules and each of the peripherals to perform power on / off control according to the dependency relationship and the connection relationship.
[0005] In some embodiments of the first aspect, the driving control unit controls the power on and off of each of the functional modules and each of the peripherals according to the dependency relationship and the connection relationship, including: when the power on and off control instruction is used to instruct each of the functional modules and each of the peripherals to turn on, controlling the startup of each of the functional modules in turn according to the dependency relationship; after each of the functional modules completes startup, controlling the startup of the corresponding connected peripheral according to the connection relationship.
[0006] In some embodiments of the first aspect, before controlling the startup of each of the functional modules in sequence according to the dependency relationship, it also includes: controlling the drive control unit to power each of the functional modules and monitoring the power-on status of each of the functional modules; controlling each of the functional modules to report bootstrap information to the drive control unit after power-on, wherein the bootstrap information includes a hardware status and a firmware version; and controlling the drive control unit to assign a node address to each of the functional modules according to the bootstrap information, so as to communicate with each of the functional modules according to the node address.
[0007] In some embodiments of the first aspect, the driving control unit controls the power on and off of each of the functional modules and each of the peripherals according to the dependency relationship and the connection relationship, including: when the power on and off control instruction is used to instruct each of the functional modules and each of the peripherals to shut down, controlling each of the peripherals to shut down according to the connection relationship; after each of the peripherals is shut down, controlling each of the functional modules to shut down in turn according to the dependency relationship.
[0008] In some implementations of the first aspect, before controlling each of the peripherals to shut down according to the connection relationship, the method further includes: performing a safety shutdown detection on each of the functional modules and each of the peripherals.
[0009] In some embodiments of the first aspect, a safe shutdown detection is performed on each of the functional modules and each of the peripheral devices, including: detecting whether the memory data of each of the functional modules has been transferred to a non-volatile storage device, detecting whether the tasks of each of the functional modules are in a paused or completed state, detecting whether the peripheral devices have stopped activities, and detecting whether each of the functional modules and each of the peripheral devices have completed one or more of the data transmission.
[0010] In some embodiments of the first aspect, the control of the drive control unit controls the power on and off of each of the functional modules and each of the peripherals according to the dependency and the connection relationship, including: when the power on and off control instruction is used to instruct each of the functional modules and each of the peripherals to force a restart, controlling the drive control unit to power off, and powering on again after a preset period of time to reset the hardware status of each of the functional modules and each of the peripherals; after the drive control unit is powered on again, controlling each of the functional modules and each of the peripherals to shut down according to the dependency and the connection relationship, and after each of the functional modules and each of the peripherals are shut down, controlling each of the functional modules and each of the peripherals to start up according to the dependency and the connection relationship.
[0011] In some embodiments of the first aspect, the robot also includes a main control unit connected to the drive control unit; the control method also includes: when the main control unit detects that the robot meets a preset control condition, transmitting the power on / off control instruction corresponding to the control condition to the drive control unit.
[0012] A second aspect of an embodiment of the present application provides a control device for a robot, wherein the robot is configured with a drive control unit, multiple functional modules connected to the drive control unit, and peripherals connected to the functional modules, and the control device includes: an acquisition unit, used to acquire the dependency relationship between each of the functional modules and the connection relationship between the peripherals and the functional modules when the drive control unit receives a power on / off control instruction; a control unit, used to control the drive control unit to control each of the functional modules and each of the peripherals to perform power on / off control according to the dependency relationship and the connection relationship.
[0013] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned robot control method when executing the computer program.
[0014] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned robot control method are implemented.
[0015] A fifth aspect of an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the steps of the above-mentioned robot control method.
[0016] In an embodiment of the present application, when the driving control unit receives a power on / off control instruction, it obtains the dependency relationship between the various functional modules and the connection relationship between the peripherals and the functional modules, and controls the driving control unit to control the power on / off control of each functional module and each peripheral according to the dependency relationship and the connection relationship. This can avoid the initialization failure of functional modules with dependencies when power is turned on at the same time, and the data loss of functional modules with dependencies or peripherals with connection relationships when the powers are turned off at the same time, thereby improving the reliability of power on / off control. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0018] Figure 1 It is a schematic diagram of the implementation flow of a robot control method provided in an embodiment of the present application;
[0019] Figure 2is a schematic diagram of the structure of the robot provided in an embodiment of the present application;
[0020] Figure 3 It is a schematic diagram of a specific implementation process of the power-on control provided in an embodiment of the present application;
[0021] Figure 4 It is a schematic diagram of a specific implementation flow of shutdown control provided in an embodiment of the present application;
[0022] Figure 5 This is a schematic diagram of a specific implementation process of forced restart provided in an embodiment of the present application;
[0023] Figure 6 is a schematic structural diagram of a robot control device provided in an embodiment of the present application;
[0024] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are protected by the present application.
[0026] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0027] In the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0028] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0029] Most of the current robot power on and off control methods are controlled by a simple power switch, which is prone to system initialization failure when starting up and data loss when shutting down, and the reliability of power on and off control is low. In view of this, the present application proposes a robot control method, in which a driving control unit controls the power on and off of functional modules and peripherals based on the dependency relationship between functional modules and the connection relationship between peripherals and functional modules, thereby avoiding the initialization failure of functional modules with dependencies when powered on at the same time, and the data loss of functional modules with dependencies or peripherals with connections when shutting down at the same time, thereby improving the reliability of power on and off control.
[0030] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.
[0031] Figure 1 The present invention provides a schematic diagram of a robot control method according to an embodiment of the present invention, which can be applied to an electronic device. The electronic device can be a computer, a mobile phone or other intelligent device for controlling or communicating with the robot, or the robot itself.
[0032] Please refer to Figure 2 The robot may be configured with a drive control unit, a plurality of functional modules connected to the drive control unit, and peripherals connected to the functional modules.
[0033] Among them, the drive control unit may refer to a drive control board (DCB), which is used to drive the connected functional modules to power on and start. The functional module may be a navigation controller board (NCB), a P / S BUS board or other types of functional boards. The P / S BUS board is a proprietary bus system defined by the robot system consisting of CAN, RS485, and RS232. Functional modules can be used to implement specific functions of the robot, for example, the navigation board can be used to implement positioning and navigation functions. Peripherals may refer to external storage devices, sensors (such as cameras, radars, etc.) or other devices that assist functional modules to implement corresponding functions.
[0034] It should be noted that some or all of the above-mentioned multiple functional modules may be connected to peripherals. When a functional module can realize a corresponding function without peripherals, it may not be connected to peripherals.
[0035] Specifically, the above robot control method may include the following steps S101 to S102.
[0036] Step S101 , when the driving control unit receives the power on / off control instruction, the dependency relationship between the functional modules and the connection relationship between the peripherals and the functional modules are obtained.
[0037] Among them, the power on / off control instruction is used to instruct the robot to power on, shut down or restart. In an embodiment of the present application, when the drive control unit receives the power on / off control instruction, the drive control unit needs to control the connected functional modules and peripherals to power on, shut down or restart. In order to ensure reliability, the drive control unit can obtain the dependency relationship between each functional module and the connection relationship between the peripherals and the functional modules. The dependency relationship represents the dependency of the functions between the functional modules. For example, when the function implementation of the functional module A depends on the function of the functional module B, it can be considered that the functional module A depends on the functional module B. The connection relationship represents the peripherals under the jurisdiction of the functional module.
[0038] This application does not limit the method of obtaining dependency and connection relationships. Generally, after the robot completes the functional module design and peripheral connection, the user can pre-store the dependency and connection relationships in the drive control unit. In other implementations, the dependency and connection relationships can also be obtained through visual recognition, active reporting of functional modules, etc.
[0039] Step S102 , controlling the driving control unit to control each functional module and each peripheral to perform power on / off control according to the dependency relationship and the connection relationship.
[0040] In the implementation of the present application, during the startup process, the driving control unit can control the function module that is dependent on to start first according to the dependency relationship and the connection relationship, and after the function module that is dependent on is started, start other function modules that depend on the function module and the peripherals connected to the function module. During the shutdown process, the driving control unit can control the peripherals to be shut down according to the dependency relationship and the connection relationship, and after the peripherals are shut down, control the function modules that depend on other function modules to be shut down first, and finally shut down the function module that is dependent on.
[0041] In an embodiment of the present application, when the driving control unit receives a power on / off control instruction, it obtains the dependency relationship between the various functional modules and the connection relationship between the peripherals and the functional modules, and controls the driving control unit to control the power on / off of each functional module and each peripheral according to the dependency relationship and the connection relationship. This can avoid the initialization failure of functional modules with dependencies when power is turned on at the same time, and the data loss of functional modules with dependencies or peripherals with connection relationships when the systems are shut down at the same time, thereby improving the reliability of power on / off control.
[0042] In some embodiments of the present application, Figure 2As shown, the robot may further include a main control unit connected to the drive control unit. The control method of the robot may further include: when the main control unit detects that the robot meets a preset control condition, transmitting a power on / off control instruction corresponding to the control condition to the drive control unit.
[0043] The main control unit may refer to a charging management unit (CMU), which is used to manage the power on and off conditions of the robot.
[0044] Specifically, the above control conditions can be divided into power-on conditions, power-off conditions, normal restart conditions and forced restart conditions, which correspond to power-on instructions, power-off instructions, normal restart instructions and forced restart instructions respectively.
[0045] In some embodiments of the present application, when the main control unit detects that the power-on button is triggered, receives a power-on command transmitted via the network, the robot is connected to an external power source, or the robot is mounted on a staking, it can be confirmed that the robot meets the power-on condition. At this time, the main control unit can output a power-on hold signal to the power-on circuit of the robot, start powering on, and transmit a power-on command to the drive control unit.
[0046] In some embodiments of the present application, when the main control unit detects that the shutdown button is triggered, the battery is low, a shutdown command transmitted via the network is received, or a soft shutdown / hard shutdown request is received, it can be confirmed that the robot meets the shutdown condition. At this time, the main control unit can transmit the shutdown command to the drive control unit.
[0047] In some embodiments of the present application, when the main control unit detects a fault recovery or a restart instruction transmitted through the network, it can be confirmed that the robot meets the normal restart condition. At this time, the main control unit can transmit a normal restart instruction to the drive control unit.
[0048] In some embodiments of the present application, when the main control unit detects that the robot cannot start normally, or detects that the robot has a serious fault, it can be confirmed that the robot has met the forced restart condition. At this time, the main control unit can transmit a forced restart instruction to the drive control unit. Among them, a serious fault in the robot can refer to the crash of the robot's key services or applications (such as communication, security monitoring, etc.) and cannot be recovered by conventional methods.
[0049] In some embodiments of the present application, Figure 3 As shown, in the step of controlling the driving control unit to control each functional module and each peripheral device to perform power on and off control according to the dependency relationship and the connection relationship, the power on control process may include step S301 to step S302.
[0050] Step S301, when the power on / off control instruction is used to instruct each functional module and each peripheral to start up, each functional module is controlled to start up in sequence according to the dependency relationship.
[0051] That is to say, when the driving control unit receives the power-on instruction, it can first control each functional module to start in sequence according to the dependency relationship. Specifically, the driving control unit can control the dependent functional module to start first according to the dependency relationship, and after the dependent functional module is started, start other functional modules that depend on the functional module.
[0052] In some embodiments of the present application, before step S301, it may also include: controlling the drive control unit to supply power to each functional module and monitoring the power-on status of each functional module; controlling each functional module to report bootstrap information to the drive control unit after power-on; controlling the drive control unit to assign a node address to each functional module according to the bootstrap information, so as to communicate with each functional module according to the node address.
[0053] The bootstrap information may include hardware status and firmware version.
[0054] Specifically, after receiving the power-on command, the drive control unit can supply power to each functional module in turn and monitor the power-on status of each functional module. After each functional module is powered on, it can perform a self-check to ensure that the hardware status is normal, and then report the bootstrap information through the bus to request the drive control unit to assign a node address. The drive control unit can check whether the functional module meets the allocation requirements based on the hardware status and firmware version. For example, when the hardware status is normal and the firmware version is correct (compatible with the current usage requirements), it can be confirmed that the functional module meets the allocation requirements. For functional modules that meet the allocation requirements, the drive control unit can assign node addresses to them to communicate with each functional module based on the node address. Subsequently, the drive control unit can broadcast the power-on command to notify the functional modules that need to be powered on to start the business functions of each functional module.
[0055] Of course, the bootstrap information may also include other information, such as hardware identification, etc., which is not limited in this application.
[0056] Step S302: After each functional module is started up, the corresponding connected peripherals are controlled to start up according to the connection relationship.
[0057] In the implementation manner of the present application, after the functional module is started, the driving control unit can control the connected peripheral device to start according to the connection relationship.
[0058] In some implementations of the present application, each functional module and peripheral device may report a startup completion message to the drive control unit after normal startup.
[0059] The method of checking whether the startup is normal may include:
[0060] 1. Check whether the hardware status and functions of each functional module are normal, including memory check, processor status, connection interface and key peripheral device status check. Any errors found during the check will be recorded in the system log, and the decision on whether to continue the boot process will be made based on the severity of the error.
[0061] 2. Verify the integrity of software and firmware, including checking the signature and checksum of the firmware or operating system to ensure that it has not been illegally modified. The firmware or software can only continue to start after the consistency and integrity verification passes.
[0062] 3. For functional modules that rely on specific services or drivers, verify that these services and drivers have been successfully loaded and run. For example, network services, input / output drivers, and sensor management must reach the running state during the startup process.
[0063] 4. Check whether the data or services of the dependent functional modules meet the requirements.
[0064] 5. Perform network connection and communication tests to ensure that all functional modules can communicate correctly with the main control unit.
[0065] 6. Performance benchmark testing to ensure that the operating performance of each functional module meets the predetermined standards.
[0066] If the drive control unit receives the power-on completion message of all functional modules and peripherals within the specified time, it can send a power-on completion signal to the main control unit, and the power-on process ends. If the power-on completion message of some functional modules or peripherals is not received within the specified time, a fault signal can be sent to the main control unit to indicate a power-on failure.
[0067] Furthermore, in some implementations of the present application, during the boot process, each functional module may record information such as self-test results and node registration status in a system log, and upload the system log to a central server.
[0068] In the implementation manner of the present application, the startup process fully considers the dependencies between the functional modules, which can avoid the problem of initialization failure of some functional modules.
[0069] In some embodiments of the present application, Figure 4 As shown, in the step of controlling the driving control unit to control each functional module and each peripheral device to perform power on / off control according to the dependency relationship and the connection relationship, the power off control process may include step S401 to step S402.
[0070] Step S401, when the power on / off control instruction is used to instruct each functional module and each peripheral device to shut down, each peripheral device is controlled to shut down according to the connection relationship.
[0071] That is to say, when the driving control unit receives a shutdown instruction, it can first control each peripheral to shut down in sequence according to the connection relationship.
[0072] Step S402, after each peripheral is turned off, control each functional module to turn off in sequence according to the dependency relationship.
[0073] That is, after each peripheral is turned off, the driving control unit can control each functional module to turn off in sequence according to the dependency relationship. Specifically, the driving control unit can control the functional modules that depend on other functional modules to turn off first, and finally turn off the dependent functional modules.
[0074] In some implementations of the present application, before step S401, the following may be included: performing a safety shutdown detection on each functional module and each peripheral device. The safety shutdown detection may be used to detect whether each functional module and each peripheral device is in a state where shutdown is allowed.
[0075] In some embodiments of the present application, the safe shutdown detection of each functional module and each peripheral device may include: detecting whether the memory data of each functional module has been transferred to a non-volatile storage device, detecting whether the task of each functional module is in a paused or completed state, detecting whether the peripheral device has stopped its activity, and detecting whether each functional module and each of the peripheral devices have completed data transmission. This ensures that the peripheral devices and functional modules can be shut down safely.
[0076] Specifically, the drive control unit can send a shutdown command to all functional modules to notify them to prepare for shutdown. Each functional module checks the status of its connected peripherals and dependent functional modules, and after confirming that it can be shut down safely, it turns off the corresponding peripherals and power supply in turn, and feeds back the current status to the drive control unit. After the drive control unit confirms that all functional modules have been safely shut down within the specified time, it sends a shutdown completion signal to the main control module. Otherwise, a fault signal is sent to the main control module.
[0077] Furthermore, in some embodiments of the present application, during the shutdown process, each functional module and peripheral device may record information such as the order and status of shutting down the peripheral devices in a system log, and upload the system log to a central server.
[0078] In the implementation manner of the present application, the shutdown process fully considers the dependencies between the functional modules and executes the shutdown action when it is safe to shut down, which can avoid data loss and system inconsistency in some functional modules.
[0079] In some embodiments of the present application, in the step of controlling the driving control unit to control the power on and off of each functional module and each peripheral device according to the dependency and connection relationship, the normal restart process may include: when the power on and off control instruction is used to instruct the functional modules and each peripheral device to restart normally, controlling each functional module and each peripheral device to shut down according to the dependency and connection relationship, and after each functional module and each peripheral device are shut down, controlling each functional module and each peripheral device to start up according to the dependency and connection relationship.
[0080] The way in which the driver control unit controls the shutdown and startup of each functional module and each peripheral can be referred to Figure 3 and Figure 4 The description of , this application will not repeat it.
[0081] That is to say, the drive control unit can ensure that all functional modules are safely shut down according to the shutdown process, and then immediately execute the startup process.
[0082] In some embodiments of the present application, the drive control unit can monitor the status of each functional module to ensure that all functional modules are normally started within the specified time. In addition, in some embodiments of the present application, during the normal restart process, each functional module and peripheral device can record information such as detailed steps of shutdown and restart in the system log, and upload the system log to the central server.
[0083] In some embodiments of the present application, Figure 5 As shown, in the step of controlling the driving control unit to control each functional module and each peripheral device to perform power on / off control according to the dependency relationship and the connection relationship, the forced restart process may include step S501 to step S502.
[0084] Step S501, when the power on / off control instruction is used to instruct each functional module and each peripheral to forcibly restart, the driving control unit is controlled to power off, and then powered on again after a preset time to reset the hardware status of each functional module and each peripheral.
[0085] That is, the drive control unit can immediately disconnect all power supplies, wait for a period of time, and then re-power on to ensure that the hardware status is reset. When all power supplies are disconnected, the robot will clear the residual data in the memory, restart the core processing unit, reset the peripherals, and clear the error status, so that the hardware status is reset. In this way, it can be avoided that the normal operation of the robot is affected by retaining the wrong configuration or fault status.
[0086] Step S502, after the drive control unit is powered on again, each functional module and each peripheral is controlled to be turned off according to the dependency and connection relationship, and after each functional module and each peripheral is turned off, each functional module and each peripheral is controlled to be started according to the dependency and connection relationship.
[0087] The way in which the driver control unit controls the shutdown and startup of each functional module and each peripheral can be referred to Figure 3 and Figure 4 The description of , this application will not repeat it.
[0088] That is, the drive control unit can follow the shutdown process to ensure that all functional modules are safely shut down, and then immediately execute the startup process. Compared with a normal restart, a forced restart adds a step of powering off and resetting the hardware status, which helps to solve the aforementioned serious faults.
[0089] In some embodiments of the present application, the drive control unit can monitor the status of each functional module to ensure that all functional modules are normally started within the specified time. In addition, in some embodiments of the present application, during the normal restart process, each functional module and peripheral device can record information such as detailed steps of shutdown and restart in the system log, and upload the system log to the central server.
[0090] The system logs recorded by each functional module can be uploaded to the central server, and the last system log will be retained to facilitate system maintenance and troubleshooting. When the central server manages the system logs, they can be stored in order. When the maximum number is exceeded, the old logs will be overwritten and cleaned up regularly to ensure that the system logs do not take up too much storage space.
[0091] It should be noted that, for the sake of simplicity of description, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the described order of actions, because according to the present application, certain steps can be performed in other orders.
[0092] like Figure 6 Shown is a schematic structural diagram of a robot control device 600 provided in an embodiment of the present application, wherein the robot control device 600 is configured on an electronic device.
[0093] Specifically, the robot control device 600 may include:
[0094] An acquiring unit 601 is used to acquire the dependency relationship between the functional modules and the connection relationship between the peripherals and the functional modules when the driving control unit receives the power on / off control instruction;
[0095] The control unit 602 is used to control the drive control unit to control each of the functional modules and each of the peripherals to perform power on / off control according to the dependency relationship and the connection relationship.
[0096] In some embodiments of the present application, the control unit 602 can be specifically used to: when the power on / off control instruction is used to instruct each of the functional modules and each of the peripherals to start up, control the startup of each of the functional modules in sequence according to the dependency relationship; after each of the functional modules completes the startup, control the startup of the corresponding connected peripherals according to the connection relationship.
[0097] In some embodiments of the present application, the control unit 602 can be specifically used to: control the drive control unit to supply power to each of the functional modules and monitor the power-on status of each of the functional modules; control each of the functional modules to report bootstrap information to the drive control unit after power-on, wherein the bootstrap information includes hardware status and firmware version; control the drive control unit to assign a node address to each of the functional modules according to the bootstrap information, so as to communicate with each of the functional modules according to the node address.
[0098] In some embodiments of the present application, the control unit 602 can be specifically used to: when the power on / off control instruction is used to instruct each of the functional modules and each of the peripherals to shut down, control each of the peripherals to shut down according to the connection relationship; after each of the peripherals is shut down, control each of the functional modules to shut down in turn according to the dependency relationship.
[0099] In some implementations of the present application, the control unit 602 may be specifically configured to: perform safety shutdown detection on each of the functional modules and each of the peripheral devices.
[0100] In some embodiments of the present application, the control unit 602 can be specifically used to: detect whether the memory data of each of the functional modules has been transferred to a non-volatile storage device, detect whether the tasks of each of the functional modules are in a paused or completed state, detect whether the peripheral device has stopped activity, and detect whether each of the functional modules and each of the peripheral devices has completed one or more of the data transmission.
[0101] In some embodiments of the present application, the control unit 602 can be specifically used to: when the power on / off control instruction is used to instruct each of the functional modules and each of the peripherals to force a restart, control the drive control unit to power off, and power on again after a preset period of time to reset the hardware status of each of the functional modules and each of the peripherals; after the drive control unit is powered on again, control each of the functional modules and each of the peripherals to shut down according to the dependency relationship and the connection relationship, and after each of the functional modules and each of the peripherals are shut down, control each of the functional modules and each of the peripherals to start up according to the dependency relationship and the connection relationship.
[0102] In some embodiments of the present application, the control device 600 of the robot may include a main control unit, which is used to: when the main control unit detects that the robot meets a preset control condition, transmit the power on / off control instruction corresponding to the control condition to the drive control unit.
[0103] It should be noted that, for the convenience and simplicity of description, the specific working process of the control device 600 of the robot can be referred to Figures 1 to 5 The corresponding process of the method will not be repeated here.
[0104] like Figure 7 , which is a schematic diagram of an electronic device provided in an embodiment of the present application. Specifically, the electronic device 7 may include: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70, such as a robot control program. When the processor 70 executes the computer program 72, the steps in the above-mentioned robot control method embodiments are implemented, such as Figure 1 Alternatively, when the processor 70 executes the computer program 72, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 6 The functions of the acquisition unit 601 and the control unit 602 are shown.
[0105] The computer program may be divided into one or more modules / units, which are stored in the memory 71 and executed by the processor 70 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0106] For example, the computer program can be divided into: an acquisition unit and a control unit. The specific functions of each unit are as follows: the acquisition unit is used to acquire the dependency relationship between each of the functional modules and the connection relationship between the peripherals and the functional modules when the drive control unit receives the power on / off control instruction; the control unit is used to control the drive control unit to control each of the functional modules and each of the peripherals to perform power on / off control according to the dependency relationship and the connection relationship.
[0107] The electronic device may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art will appreciate that Figure 7 These are merely examples of electronic devices and do not constitute a limitation of the electronic device. The electronic device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0108] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0109] The memory 71 may be an internal storage unit of the electronic device, such as a hard disk or memory of the electronic device. The memory 71 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Furthermore, the memory 71 may also include both an internal storage unit of the electronic device and an external storage device. The memory 71 is used to store the computer program and other programs and data required by the electronic device. The memory 71 may also be used to temporarily store data that has been output or is to be output.
[0110] It should be noted that, for the convenience and brevity of description, the structure of the above electronic device can also refer to the specific description of the structure in the method embodiment, which will not be repeated here.
[0111] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0112] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0113] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0114] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0115] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0117] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0118] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A robot control method, characterized in that: The robot is configured with a drive control unit, a plurality of functional modules connected to the drive control unit, and peripherals connected to the functional modules, and the control method includes: When the driving control unit receives the power on / off control instruction, the dependency relationship between the functional modules and the connection relationship between the peripherals and the functional modules are obtained; The driving control unit is controlled to control each of the functional modules and each of the peripherals to perform power on / off control according to the dependency relationship and the connection relationship.
2. The robot control method according to claim 1, characterized in that: The controlling the driving control unit controls each of the functional modules and each of the peripherals to perform power on / off control according to the dependency relationship and the connection relationship, including: In the case where the power on / off control instruction is used to instruct each of the functional modules and each of the peripherals to start up, each of the functional modules is controlled to start up in sequence according to the dependency relationship; After each of the functional modules is started up, the corresponding peripheral device is controlled to start up according to the connection relationship.
3. The robot control method according to claim 2, characterized in that: Before controlling the startup of each of the functional modules in sequence according to the dependency relationship, the method further includes: Controlling the drive control unit to supply power to each of the functional modules, and monitoring the power-on status of each of the functional modules; Control each of the functional modules to report bootstrap information to the drive control unit after power-on, wherein the bootstrap information includes hardware status and firmware version; The driving control unit is controlled to allocate a node address to each of the functional modules according to the bootstrap information, so as to communicate with each of the functional modules according to the node address.
4. The robot control method according to claim 1, characterized in that: The controlling the driving control unit controls each of the functional modules and each of the peripherals to perform power on / off control according to the dependency relationship and the connection relationship, including: In the case where the power on / off control instruction is used to instruct each of the functional modules and each of the peripherals to shut down, each of the peripherals is controlled to shut down according to the connection relationship; After each of the peripherals is turned off, each of the functional modules is controlled to be turned off in sequence according to the dependency relationship.
5. The robot control method according to claim 4, characterized in that: Before controlling each of the peripheral devices to be turned off according to the connection relationship, the method further includes: Perform safety shutdown detection on each of the functional modules and each of the peripherals.
6. The robot control method according to claim 5, characterized in that: Performing a safety shutdown detection on each of the functional modules and each of the peripherals includes: Detect whether the memory data of each functional module has been transferred to a non-volatile storage device, detect whether the task of each functional module is in a paused or completed state, detect whether the peripheral device has stopped its activity, and detect whether each functional module and each peripheral device has completed one or more of the data transmission.
7. The robot control method according to claim 1, characterized in that: The controlling the driving control unit controls each of the functional modules and each of the peripherals to perform power on / off control according to the dependency relationship and the connection relationship, including: In the case where the power on / off control instruction is used to instruct each of the functional modules and each of the peripherals to forcibly restart, the drive control unit is controlled to be powered off, and then powered on again after a preset time, so as to reset the hardware status of each of the functional modules and each of the peripherals; After the drive control unit is powered on again, each of the functional modules and each of the peripherals are controlled to be turned off according to the dependency relationship and the connection relationship, and after each of the functional modules and each of the peripherals are turned off, each of the functional modules and each of the peripherals are controlled to be started according to the dependency relationship and the connection relationship.
8. The robot control method according to any one of claims 1 to 7, characterized in that: The robot further includes a main control unit connected to the drive control unit; the control method further includes: When the main control unit detects that the robot meets a preset control condition, the power on / off control instruction corresponding to the control condition is transmitted to the drive control unit.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the robot control method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the robot control method according to any one of claims 1 to 8 are implemented.
