Introduction
This article goes over how to configure the camera and recorder service to be able to support JPEG topic. Once the camera service is updated to publish JPEG, the recorder service can be further modified to start saving said topic in the MCAP.
Requirements
How to Update Camera Service
- SSH onto the device using:
ssh torizon@<HOSTNAME>
- Once n the device stop the current camera service:
sudo systemctl stop camera
- Set the JPEG flag as 'true' in the camera config
sudo vi /etc/default/camera
# Maivin Camera Configuration
Initially JPEG will equal false change to true as shown above (User can turn of H264 topic being published by setting it to false).
<REMOVED FOR BREVITY>
# Controls the H.264 streaming mode.
H264 = "true"
# Controls the JPEG streaming mode.
JPEG = "true" - Once camera config has been updated run:
sudo systemctl daemon-reload
sudo systemctl restart camera - Now the camera service should be updated to publish JPEG frames
How to Update Recorder Service
- SSH onto the device using:
ssh torizon@<HOSTNAME>
- Once in the device stop the current recorder service:
sudo systemctl stop recorder
- Update the recorder config to look for JPEG topic
sudo vi /etc/default/recorder
# Maivin MCAP Recorder Configuration
As shown above add the /camera/jpeg topic as follow .
<REMOVED FOR BREVITY>
# Record the following topics. If certain topics are unavailable the recording
# will still be performed but the missing topics will be logged in a warning
# message. If none of the topics are available the recording will terminate.
TOPICS = "/camera/jpeg /imu /gps /camera/h264 /camera/info /detect/boxes2d /detect/visualization /detect/info" - Once recorder config has been updated run:
sudo systemctl daemon-reload
sudo systemctl restart recorder - Now the recorder service should be updated to save JPEG to the MCAP file
Notes
Based on testing conducted at Au-zone, JPEG is able to run at 10 FPS at a resolution of 1920x1080, however if you would like to increase the framerate for JPEG a few measures can be taken:
- Set H264 flag in the camera config to false.
- Decrease the STREAM_SIZE flag in camera config:
- 1280x720 which would result in JPEG running at 15FPS
- 960x540 which would result in JPEG running at 30FPS
Comments
0 comments
Please sign in to leave a comment.