Halt
{"cmd":"halt", ...}
This command will force the robot to stop the motion immediately by decelerating from the current speed to zero speed. All remaining commands in the queue of the robot will also be deleted. Until the halt motion is completed, no new command except the alarm
command (see alarm
section), will be accepted by the robot.
The halt motion by default uses the same deceleration as the original move command acceleration that is being stopped by the halt command. However, using parameter accel
(default is 1), the user can increase the deceleration rate. If the accel
parameter is present, the controller will stop the motion by deceleration rate which is the accel
parameter of the halt command multiplied by the accel
parameter of the original command. This will help the robot to decelerate faster during emergency halt commands.
Key, value pairs
Key | Value | Required | Description |
---|---|---|---|
"cmd" | "halt" | Yes | Halts the robot by decelerating to zero speed. |
"id" | Int (>0) | No | Id can be any positive integer. If id is not provided, status of the command will not be returned from the controller. |
"accel" | Double (>=1) | No | If present, the robot will decelerate to zero speed by deceleration rate which is the accel value times the original command accel value. Otherwise, the robot will decelerate with the deceleration value equal to the original move command accel value. Note that this parameter cannot be less than 1. |
Example
{"cmd":"halt", "id":1, "accel":7.5}
Immediately after receiving this command, the robot will decelerate at the rate of 7.5 * accel
to full stop, where accel
is the parameter value from the original move command which halt
command is acting on.
Error codes
Stat | Value |
---|---|
-1 | General error |
-2 | Accel value provided is not valid |
-300 | Halt already in process |
-400 | Alarm activated |