Help Center
Synchronization of scene

Server Data and Robot Data Inspection Principles

During scene synchronization and restoration, uploading/updating maps to robots and switching maps are involved. Uploading/updating maps is based on the differences between map data in RDSCore and map data in the robot.
After the scene is constructed and robot maps are loaded in different areas, click on different areas in the roboshop, and theright sidebar will display the maps of the related robots loaded in this area. As shown below, two maps, default_map of AMB-201 and AMB-202, were added to the area Area-01. Here, you need to remember a concept: a robot's map in the scene is the sum of the maps the robot loads in each area.

When comparing server data and robot data, for each robot, server data refers to **the current robot's map in the scene.** Robot data refers to the map name and related information of all local maps of the robot.

Please note: This concept only applies when the RDSCore version is higher than 0.1.8.221123. In previous versions, for each robot, server data refers to all maps of the current robot in the scene file.

Server data and robot data inconsistency can be explained in two aspects:

  1. The local map of the robot includes the current robot's map in the scene (i.e., the map loaded by the robot in the scene is a subset of the robot's local map)

In this case, if the server data and robot data are inconsistent, it means that the MD5 value of the map in the robot's local data is inconsistent with the one in the scene.

  1. The robot's local map does not include the current robot's map in the scene

In this case, if the server data and robot data are inconsistent, it means that some maps in the scene are brand new and do not exist in the robot's local storage.

Syncing

Syncing refers to the process of comparing the server data and robot data for each robot, uploading all inconsistent maps in the scene to the robot.
For example, in the image above, both robots in the scene have a map named default_map with an md5 value of 38b573f98bbf2724489ed89bb3f313ea. If you use roboshop to modify the local default_map of these two robots separately and push it to the robots, RDSCore will display that the data is not synchronized, as shown in the image below.

At this point, if the scene is synced, since the server data is already inconsistent with the data in the robots, RDSCore will re-upload the maps loaded by these two robots in the scene to the robots. In this example, RDSCore will re-upload the map default_map with md5 value 38b573f98bbf2724489ed89bb3f313ea to AMB-201 and AMB-202. This will be done regardless of how the local default_map on the robot is modified.

Synchronization Constraints

If RDSCore does not have the control authority of the current Robot or the current Robot is disconnected, the synchronization of this Robot will be unsuccessful. At this time, there will be an Error code 55000. This error code will automatically disappear once the synchronization is successful next time.

Synchronization between Roboshop and Robot's Synchronization Server

Selecting a single robot's data synchronization page, you can pull the inconsistent maps between the robot's local data and the scene data in Roboshop, and load the retrieved maps into the scene.
Once this action is completed, the data in the scene is consistent with the robot's local data, and Roboshop uploads the scene. Since there are no inconsistent data, the synchronization operation is skipped and does not upload inconsistent data between the scene and the robot (there is no inconsistent data at this time).
The complete process flowchart is as follows:

Parameters for automatic synchronization during scene uploading

When uploading a scene, there is a parameter that can be configured to enable or disable the automatic synchronization feature. If enabled, all data inconsistencies between the scene and the Robot's local data will be automatically uploaded to the Robot during the upload process; if not enabled, the upload step will be skipped, and in case of any data inconsistencies, you can manually call the server to synchronize the Robot.

Synchronization with robots in the roboshop server

Select the server synchronization robot in the data synchronization page, at this time roboshop will not pull the robot's local data into the scene, so there may be maps in the scene that are inconsistent with the robot's local data.
After receiving the server synchronization robot request, RDSCore starts the synchronization operation directly. For robots with inconsistent data, RDSCore will upload the server data to the robot.
The whole process is as follows

Last updated 2023/05/17
Article content

Server Data and Robot Data Inspection Principles

Syncing

Synchronization Constraints

Synchronization between Roboshop and Robot's Synchronization Server

Parameters for automatic synchronization during scene uploading

Synchronization with robots in the roboshop server