NOTE:

(1) This guide mainly introduces the common interfaces of SDK2.0, for more information on interfaces, please refer to https://docs.slamtec.com/#/.

(2) This interface is available for all  chassis, APOLLO,ATHENA1.0,ATHENA2.0,HERMES are included.

(3) SDK 2.0 requires a firmware version of the chassis,The specific version requirements are as follows:

Firmware

Athena1.0&APOLLO

Athena2.0

Hermes

Latest Version

If you have questions about your robot's firmware version, please contact FAE for remote upgrade support.Thank you.

2.3.1 system

Mainly contains system resources for robots.

2.3.1.1 Acquisition of robotics capabilities

GET /api/core/system/v1/capabilities

(1) Get robot capabilities , you can see which modules the robot supports.

(2) Currently the chassis only supports agent.core, agent.platform, agent.multi_floor

2.3.1.2 Get battery level and charging status

GET /api/core/system/v1/power/status

(1) Get battery level and charging status

2.3.1.3 Power off and reboot

2.3.1.4 Get robot health information

GET /api/core/system/v1/robot/health

2.3.1.5 Set robot speed

PUT /api/core/system/v1/parameter

  1. base.max_moving_speed - Max. linear speed

  2. base.max_angular_speed - Max. angular velocity

  3. docking.docked_register_strategy - Charging pile registration policy, always register every time when return to the charge station, when_not_exists register when the charge station does not exist

2.3.2 slam

Mainly about robot‘s map building and localization functions

2.3.2.1 Acquisition of robot posture


GET /api/core/slam/v1/localization/pose

2.3.2.2 Set robot posture


PUT /api/core/slam/v1/localization/pose

2.3.3 platform

2.3.3.1 Get the event information of the robot


GET /api/platform/v1/events

  1. Returns all current event information as an array

        2. Definition of event types


2.3.4 multi-floor

Although it is a plugin for managing multiple floors, it also supports single-floor maps.

2.3.4.1 Get POI information


GET /api/multi-floor/map/v1/pois

Specify the floor by parameter, and get the POI of all floors without parameter.

  1. Parameters

    1. Floor: string Type, name of floor

    2. building: string Type, building name

  2. return value

2.3.4.2 Find the nearest POI


POST /api/multi-floor/map/v1/pois/:search_nearby

Find the nearest POI information to the robot
The name has three special values, ON_DOCK means on the charge station, IN_ELEVATOR means inside the elevator, UNKNOWN means no POI, there is no relative_pose field at this time, the other values all indicate the name of the regular POI added in the map.


2.3.4.3 Sync Map


POST /api/multi-floor/map/v1/stcm/:sync

Save the current map to a file and reload it [Note] This operation is prohibited in a multi-floor environment, otherwise the maps of other floors will be lost.

2.3.5 motion

action : action is the motion behavior supported by the robot,the use process is as follows:

  1. Check the supported actions firstly

  2. create the action

  3. Query the action status based on the action id returned, which is used to determine the current behavior of the robot.


2.3.5.1 Get all supported actions

  1. Interface:GET /api/core/motion/v1/action-factories

  2. Description:MoveToAction is compared with MultiFloorMoveAction, both are completed to move to the point. But the former does not support multi-floor, poi as the target point, multi-machine scheduling, so we unify under support, move to the point are using MultiFloorMoveAction.


2.3.5.2 create action

  1. POST /api/core/motion/v1/actions

  2. Description (fill in the parameters)

    1. "action_name": Fill in the supported action name, and query them through the /core/motion/v1/action-factories interface

    2. "options":Fill in the motion target points and parameters, depending on the action type

  3. Examples

    1. Move to point:MultiFloorMoveAction

             b. Multi-target point movement:SeriesMoveToAction

          c. Back to Charge Station : MultiFloorBackHomeAction

Back to the charge station behavior by default

Back to the charge station behavior is special

         4. Return value after creation of action


2.3.5.3 Querying the status of an Action

  1. GET /api/core/motion/v1/actions/{action_id}
    When creating an action will return an action_id, according to this id we can query the current state of the action we created, the return information is as follows.

       2. GET /api/core/motion/v1/actions/:current

The robot can only execute a single action at each moment, so each time an action is created, the previous action is cancelled and the current action is executed.
So we can look up the current action directly instead of looking it up by action id.
Simplification of interface 1 above(GET /api/core/motion/v1/actions/{action_id})


2.3.5.4 Stop the current action

DELETE /api/core/motion/v1/actions/:current

Terminates the current robot behavior and the robot becomes stationary.





  • No labels