Simple Socket Service

WARNING

This feature will be deprecated

LEBAI Robots provides two TCP/Socket services for simple task execution and status push. These services provide basic functionality, and developers need to combine with other services to implement more complex control.

Task Control

Port number: 5171. Sending data streams to this service can control task execution.

Run Task

start_task|<scene_id>|<execute_count>
Parameter NameParameter TypeDescription
scene_idintScene ID, can be viewed in the scene list
execute_countintNumber of task executions. 0: indicates loop execution. If not 0, e.g., 3 means execute 3 times

Request Example

start_task|100008|0

Stop Task

stop_task|<type>
Parameter NameParameter TypeDescription
typeint0: Stop loop task after current cycle completes (invalid in version 2.2) 1: Stop immediately

Request Example

stop_task|1

Pause Task

pause_task

Resume Task

resume_task

Robot Status Notification Interface

Port number: 5170. This service pushes task and robot running status once per second.

<task_status>|<robot_mode>
Parameter NameParameter TypeDescription
task_statusint0: Idle 1: Running
robot_modeintRobot Status

Push Examples

ExampleDescription
0|5No task currently running, robot is idle
1|6Task is currently running, robot is paused