Robot and controlling method thereof
A robot includes: a communication interface, a memory, and a processor configured to: transmit identification information and state information of the robot to an external server; based on receiving, from the external server, first information including identification information, type information and state information of at least one other robot, store the first information in the memory, based on identifying that an error occurred in communication with the external server, determine whether the robot is to operate as a master robot by comparing the type information and the state information of the at least one other device with type information and first state information of the robot; based on the robot operating as the master robot, plan a movement route of the at least one other robot based on task information of the at least one other robot, and transmit he planned movement route to the at least one other robot.
1 . A robot comprising:
a communication interface;
a memory storing at least one instruction and first type information of the robot; and
at least one processor;
wherein the at least one instruction, when executed by the at least one processor individually or collectively, causes the robot to:
transmit first identification information of the robot and first state information of the robot to an external server via the communication interface,
based on receiving, from the external server via the communication interface, information of at least one other robot comprising second identification information of the at least one other robot, second type information of the at least one other robot, second state information of the at least one other robot, and driving information about a planned movement route of the at least one other robot, store the received information in the memory and update information corresponding to the at least one other robot stored in the memory based on the received information,
identify that a communication error has occurred in communication between the robot and the external server via the communication interface,
based on identifying that the communication error originated from the external server, determine whether the robot is to operate as a master robot by comparing the second type information and the second state information with the first type information and the first state information, respectively, based on most recently updated information stored in the memory based on a time point when the communication error occurred,
based on determining that the robot is to operate as the master robot, plan a movement route of the at least one other robot based on task information of the at least one other robot, and
transmit, via the communication interface, the planned movement route to the at least one other robot.
2 . The robot of claim 1 , wherein the at least one instruction, when executed by the at least one processor individually or collectively, causes the robot to:
based on the second type information and the first type information, identify at least one candidate robot from among the at least one other robot and the robot, and
determine whether the robot is to operate as the master robot based on state information of the at least one candidate robot.
3 . The robot of claim 2 , wherein the at least one instruction, when executed by the at least one processor individually or collectively, causes the robot to:
identify a guide type robot as the at least one candidate robot based on the second type information and the first type information.
4 . The robot of claim 2 , wherein each of the first state information and the second state information comprises:
at least one of information about a battery remaining amount, information related to performance of a task, or error information, and
wherein the at least one instruction, when executed by the at least one processor individually or collectively, causes the robot to:
identify, from among the at least one candidate robot, at least one robot having the battery remaining amount greater than or equal to a threshold value based on the information about the battery remaining amount of the at least one candidate robot, and
determine whether the robot is to operate as the master robot based on at least one of the information related to performance of the task of the at least one identified robot or the error information of the at least one identified robot.
5 . The robot of claim 1 , wherein the at least one instruction, when executed by the at least one processor individually or collectively, causes the robot to:
based on the robot operating as the master robot, request information from the at least one other robot comprising the second state information, environment information of the at least one other robot, and the driving information about the planned movement route of the at least one other robot,
correct the planned movement route of the at least one other robot based on the requested information being received, and
transmit, via the communication interface, the corrected planned movement route to the at least one other robot.
6 . The robot of claim 5 , wherein the environment information comprises:
at least one of location information of the at least one other robot, road condition information around the at least one other robot, obstacle type information, or distance information from an obstacle.
7 . The robot of claim 1 , wherein the at least one instruction, when executed by the at least one processor individually or collectively, causes the robot to:
based on identifying that the robot is not the master robot, transmit, via the communication interface, the first state information and environment information of the robot.
8 . A method of controlling a robot, the method comprising:
transmitting first identification information of the robot and first state information of the robot to an external server;
based on receiving, from the external server, information comprising second identification information of at least one other robot, second type information of the at least one other robot, second state information of the at least one other robot, and driving information about a planned movement route of the at least one other robot, storing the received information and updating stored information corresponding to the at least one other robot based on the received information of the at least one other robot;
identifying that a communication error has occurred in communication between the robot and the external server,
based on identifying that the communication error originated from the external server, determining whether the robot is to operate as a master robot by comparing the second type information and the second state information with first type information of the robot and the first state information based on most recent updated information based on a time point when the communication error occurred;
based on determining that the robot is to operate as the master robot, planning a movement route of the at least one other robot based on task information of the at least one other robot; and
transmitting the planned movement route to the at least one other robot.
9 . The method of claim 8 , wherein the determining whether the robot is to operate as the master robot comprises:
based on the second type information and the first type information, identifying at least one candidate robot from among the at least one other robot and the robot; and
determining whether the robot is to operate as the master robot based on state information of the at least one candidate robot.
10 . The method of claim 9 , wherein the identifying the at least one candidate robot comprises:
identifying a guide type robot as the at least one candidate robot based on the second type information and the first type information.
11 . The method of claim 9 , wherein each of the first state information and the second state information comprises:
at least one of information about a battery remaining amount, information related to performance of a task, or error information, and
wherein the determining whether the robot is to operate as the master robot comprises:
identifying, from among the at least one candidate robot, at least one robot having the battery remaining amount greater than or equal to a threshold value based on the information about the battery remaining amount of the at least one candidate robot; and
determining whether the robot is to operate as the master robot based on at least one of the information related to performance of the task of the at least one identified robot or the error information of the at least one identified robot.
12 . The method of claim 8 , further comprising:
based on the robot operating as the master robot, requesting, from the at least one other robot, information comprising the second state information, environment information of the at least one other robot, and the driving information about the planned movement route of the at least one other robot;
correcting the planned movement route of the at least one other robot based on the requested information being received; and
transmitting the corrected planned movement route of the at least one other robot to the at least one other robot.
13 . The method of claim 12 , wherein the environment information comprises at least one of location information of the at least one other robot, road condition information around the at least one other robot, obstacle type information, or distance information from an obstacle.
14 . The method of claim 8 , further comprising:
based on identifying that the robot is not the master robot, transmitting the first state information and environment information of the robot.
15 . A non-transitory computer-readable recording medium storing therein computer-readable instructions, the computer-readable instructions being used for executing a method, the method comprising:
transmitting first identification information of a robot and first state information of the robot to an external server;
based on receiving, from the external server, information comprising second identification information of at least one other robot, second type information of the at least one other robot, second state information of the at least one other robot, and driving information about a planned movement route of the at least one other robot, storing the received information and updating stored information corresponding to the at least one other robot based on the received information of the at least one other robot;
identifying that a communication error has occurred in communication between the robot and the external server,
based on identifying that the communication error originated from the external server, determining whether the robot is to operate as a master robot by comparing the second type information and the second state information with first type information of the robot and the first state information based on most recent updated information based on a time point when the communication error occurred;
based on determining that the robot is to operate as the master robot, planning a movement route of the at least one other robot based on task information of the at least one other robot; and
transmitting the planned movement route to the at least one other robot.
16 . The robot of claim 1 , wherein the at least one instruction, when executed by the at least one processor individually or collectively, causes the robot to:
periodically receive, via the communication interface, the information of the at least one other robot from the external server, and update the received information stored in memory, and wherein the determining whether the robot is to operate as the master robot is based on comparing the second type information and the second state information that was most recently updated before the time point when the communication error occurred.