Skip to main content
Version: v2

Start streaming

By sending this message, the controller is notified to transition to streaming mode. Along with the message, a payload needs to be transmitted that configures the streaming mode.

The message is sent as an HTTP PUT request to http://{robot ip}/api/v3.0/start-streaming.

Requirements​

The request is only accepted if:

  • the Robot is on the "Beta" update channel (see Enable beta features),
  • the request carries a valid control token in the X-Robflow-Control-Token header (see Control token),
  • RobFlow is in Teach or Flow mode with the Robot idle, i.e. no Flow is running and the Robot is not moving.

Otherwise, RobFlow answers with an error (e.g. 409 Conflict) and does not forward the request.

The controller additionally checks the request when it receives it. It only switches to streaming mode if:

  • the Robot is holding its position, i.e. it is not moving, jogging or paused on a trajectory,
  • no safety stop (SS1, SS2) is active,
  • every joint is within its soft limits, and
  • target_frequency is between 50 Hz and 500 Hz.

If one of these checks fails, the controller ignores the request and writes the reason to the controller logs (http://{robot ip}/logs/). The HTTP request still succeeds in this case. To confirm that streaming mode was entered, check that the streaming state in the feedback messages changes to ready (0x10).

Payload​

  • mode The desired streaming mode, i.e. the type of streaming messages the controller expects
  • target_frequency The frequency at which streaming messages will be sent in [Hz]. Must be between 50 Hz and 500 Hz. Default: 200. In the motion modes (1 to 4), the controller tunes its input filter to this frequency, so the messages should actually arrive at this rate.
  • source_ip The IP address from which streaming messages will be sent. Messages from all other addresses are rejected.

Example:

{
"mode": 1,
"target_frequency": 200,
"source_ip": {
"address": "192.168.1.99"
}
}

Ending streaming​

Streaming ends when the controller detects one of the stop conditions listed in Streaming states and stop conditions, or when a stop is requested (e.g. via PUT http://{robot ip}/api/v3.0/stop with the control token, or the stop button in RobFlow). To stream again, send this message again.