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 Name | Parameter Type | Description |
---|---|---|
scene_id | int | Scene ID, can be viewed in the scene list |
execute_count | int | Number 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 Name | Parameter Type | Description |
---|---|---|
type | int | 0: 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 Name | Parameter Type | Description |
---|---|---|
task_status | int | 0 : Idle 1 : Running |
robot_mode | int | Robot Status |
Push Examples
Example | Description |
---|---|
0|5 | No task currently running, robot is idle |
1|6 | Task is currently running, robot is paused |