(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.
Mainly contains system resources for robots.
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
GET /api/core/system/v1/power/status
(1) Get battery level and charging status
GET /api/core/system/v1/robot/health
PUT /api/core/system/v1/parameter
base.max_moving_speed
- Max. linear speed
base.max_angular_speed
- Max. angular velocity
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
Mainly about robot‘s map building and localization functions
GET /api/core/slam/v1/localization/pose
PUT /api/core/slam/v1/localization/pose
GET /api/platform/v1/events
Returns all current event information as an array
2. Definition of event types
Although it is a plugin for managing multiple floors, it also supports single-floor maps.
GET /api/multi-floor/map/v1/pois
Specify the floor by parameter, and get the POI of all floors without parameter.
Parameters
Floor: string Type, name of floor
building: string Type, building name
return value
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.
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.
action : action is the motion behavior supported by the robot,the use process is as follows:
Check the supported actions firstly
create the action
Query the action status based on the action id returned, which is used to determine the current behavior of the robot.
Interface:GET /api/core/motion/v1/action-factories
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.
POST /api/core/motion/v1/actions
Description (fill in the parameters)
"action_name": Fill in the supported action name, and query them through the /core/motion/v1/action-factories interface
"options":Fill in the motion target points and parameters, depending on the action type
Examples
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
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}
)
DELETE /api/core/motion/v1/actions/:current
Terminates the current robot behavior and the robot becomes stationary.