Environment variables for the agent
You can use environment variables to control Formant agent behavior by editing the following .bashrc file:
/var/lib/formant/.bashrc
The formant user which runs the formant-agent process sources /var/lib/formant/.bashrc before running the agent process.
This guide will outline the list of available environment variables, their default values, and their usage.
If the default value for an environment variable is empty, this variable has no effect until you set a value.
Restart the agent for changes to take effectPlease make sure to restart the agent (
systemctl restart formant-agentfor native installations) for any changes to environment variables to take effect.For more information, see Installing the Formant agent: Starting and stopping the agent.
ROS environment variables
Name | Default value | Description |
|---|---|---|
| The path to the root of the catkin workspace. The Formant agent uses this to find custom ROS 1 message definitions. | |
| Absolute path to the colcon workspace for custom ROS 2 message definitions. | |
|
| The file location of the Python interpreter used by the tf2 bridge. |
|
| Enables replacement of timestamps on ROS messages with the current time. |
| ROS 1: ROS 2: | Set a custom name for the ROS node. |
|
| |
|
| The address of the ROS master to which the Formant ROS Bridge connects. |
| The agent will source this script before running. Useful to set environment variables, etc. If the ROS setup files are not in |
General environment variables
Name | Default value | Description |
|---|---|---|
|
| The port where the Formant Agent will expose the gRPC interface. |
|
| The Unix Socket where the Formant Agent will start its server. |
|
| The port where the Formant Agent will expose the HTTP interface. |
|
| The IP address where the Formant Agent will start it's server. |
|
| The file location of the python3 interpreter used by the ROS bridge and media encoder. |
| File location of the TLS cert. | |
| File location of the TLS key | |
|
| Enables debug logs. |
|
| Disables all python subprocesses for the agent. This includes the media encoder, ROS bridge, and ROS TF bridge. Since the media encoder is a python subprocess, disabling python will disable all video and audio encoding. |
|
| Disables the automatic collection and ingestion of default telemetry streams, such as CPU, memory, and IP-based location. |
|
| Disables system information collection. (Used for NVIDIA containers). |
|
| Disables the automatic collection and ingestion of default telemetry streams specific to Tegra systems. Jetson products (Nano, Xavier, etc.) are Tegra systems. |
|
| Disables the web terminal feature that allows users to run a shell through the agent. |
|
| Used to monitor ROS 1 bridge performance. If |
| Name of the Formant Agent, used to override Agent name during provisioning. | |
| When When | |
|
| Enables the local port forwarding feature. |
| Formant provisioning token used to provision an agent. | |
|
| When set to When set to If |
|
| If |
|
| Size in bytes of the terminal buffer. |
|
| Enables the uploading of debug logs when the environment is not production. |
| Timeout for teleoperation messages. Messages which are older than the timeout are deemed 'stale' and disregarded. For example, if you set | |
| N/A | Set the network interface to connect via webRTC |
Media environment variables
|
| Enables jetson hardware accelerated encoding of video. |
|
| The speed-preset for Jetson hardware-accelerated video encoding. Values are in the range [0,4]. |
|
| If other pixel formats do not work well, allow H264 to also be chosen. This will be |
|
| Desired bitrate of uploaded audio. |
|
| Number of channels of the audio device. |
|
| Use anlmdn filter on audio to reduce noise. |
|
| Sample format of the audio device. |
|
| Sample rate of audio device's signal. |
|
| Disable Formant agent resizing the aspect ratio of the video. |
|
| Allow Formant to automatically reduce the video bitrate if network degradation is detected during teleoperation. Note: this will also affect encoding for telemetry streams. |
|
| Adds encoder statistics to Formant agent logs. Experimental feature. |
|
| Set the quality/speed tradeoff with GStreamer speed preset (corresponds to the enum Options from fastest (least CPU time) to slowest (highest quality): |
|
| Overrides the bitrate (Kbps) of all agent-encoded video streams. |
|
| Set the Video Buffering Verifier buffer size in milliseconds. This is used to control the maximum bitrate that the encoder can produce at any given time. The default of 30 milliseconds favors a stricter control suitable for high bitrate and framerate. Shorter buffer times may allow for more consistent throughput, while being more vulnerable to network spikes. |
|
| Decode RTMP stream as FLV (Turn off if RTMP stream isn't working, usually because it has an audio stream). |
|
| If the Jetson accelerated encoder crashes, the Formant agent will turn it off. Set this to |
|
| Enable use of Picam on Raspberry Pi or Jetson |
|
| Formant's encoder will not output frames at a rate higher than the frame rate cap. If the hardware source is greater than this value, Formant will re-encode it to this value. |
|
| Enable log info for GStreamer. |
|
| Interval in frames at which the encoder should insert full frames into output video. If you are experiencing blocky or glitchy video, consider decreasing this interval. This will transmit full frames more frequently. This may increase data consumption. |
|
| Bitrate to set video to when low bandwidth mode is enabled. |
|
| Override audio configuration with provided values. |
|
| Override video bitrate from configuration. |
|
| Receive h264 video directly from hardware camera if offered. |
|
| Prefer the |
|
| Length in ms of RTSP buffer. Increase this to add stability to RTSP video (at cost of latency). |
| '"udp+tcp"' | Protocol for RTSP stream. Choose |
|
| Target framerate for hardware video streams. |
|
| Enables use of jitter buffer (debug only). |
|
| Assumed framerate of video, if framerate cannot be determined from source. |
| " ! clockoverlay" | Overlay a timestamp and other GStreamer strings on your video stream |
|
| Sets the 'rate control' of the video encoder. Corresponds to the enum "GstX264EncPass". If it is |
|
| If using |
|
| Override Formant's standard Refer to |
See also
- Install the Formant agent
- Install the Formant agent via Docker
- Ingesting telemetry data
- Teleoperation
If you notice an issue with this page or need help, please reach out to us! Use the 'Did this page help you?' buttons below, or get in contact with our Customer Success team via the Intercom messenger in the bottom-right corner of this page, or at [email protected].
Updated 3 days ago
