Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document changes to sysid and component id #26

Merged
merged 2 commits into from
Apr 24, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions en/guide/configuration_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Key | Description | Default
`port` | MAVLink destination UDP port. | 14550
`broadcast_addr` | Broadcast address to send MAVLink heartbeat messages. | 255.255.255.255
`rtsp_server_addr` | IP address or hostname of the interface where the RTSP server is running. This is the address that will be used by the client to make the RTSP request. | 0.0.0.0
`system_id` | System ID of the CSD to be used in MAVLink communications. This should typically match the ID of the connected autopilot (i.e. the CSD/connected cameras are considered MAVLink *components* of the autopilot *system*). | 42
`system_id` | System ID of the CSD to be used in MAVLink communications. This should typically match the ID of the connected autopilot (i.e. the CSD/connected cameras are considered MAVLink *components* of the autopilot *system*). If not defined CSD will use 1 until it is able to read a value from an autopilot heartbeat. | 1

Example (for Ubuntu):
```
Expand All @@ -80,8 +80,7 @@ rtsp_server_addr=127.0.0.1
system_id=1
```

> **Note** There is no `component-id` key because these IDs are auto-allocated by CSD (starting from
[MAV_COMP_ID_CAMERA2](https://mavlink.io/en/messages/common.html#MAV_COMP_ID_CAMERA2)). If more than 5 cameras are added the additional cameras will not be addressable, and CSD will log an error.
> **Note** There is no `component-id` key because these IDs are auto-allocated by CSD. If more than 6 cameras are added (5 when using Gazebo) the additional cameras will not be addressable, and CSD will log an error.

### [uri] {#uri}

Expand Down
14 changes: 8 additions & 6 deletions en/guide/overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Overview
# Overview

The diagram below shows the main components of a "typical" system that is running the *Camera Streaming Daemon* on a Linux companion computer.
CSD connects to multiple cameras that are attached to the Linux computer.
Expand All @@ -16,7 +16,7 @@ CSD supports the following key features:
* Automatically attaches [compatible cameras](#supported_cameras) connected to the Linux computer when it is started.
* RTSP video streaming from *all* connected cameras (for consumption by GCS or other video players).
* RTSP video stream advertising/discovery using Avahi.
* [MAVLink Camera Protocol](#mavlink_support) support for up to 5 cameras, enabling image/video capture and storage, and querying/setting camera options.
* [MAVLink Camera Protocol](#mavlink_support) support for up to 6 cameras, enabling image/video capture and storage, and querying/setting camera options.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should image capture, video capture be part of key feature of CM?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. They are, but they are part of "MAVLink support". That is why the doc says "... support for up to 6 cameras, enabling image/video capture and storage, and querying/setting camera options."

* Gazebo simulated camera backend (so you can view video streams from within a simulated environment)!
* Configurable back-end that can be extended to interface with new types of cameras and new front-end protocols.

Expand Down Expand Up @@ -44,16 +44,18 @@ Advanced configuration information about individual cameras is specified in [Cam

CSD implements the [MAVLink Camera Protocol](https://mavlink.io/en/protocol/camera.html) for image and video capture and storage, and for getting/setting camera parameters and options.

The MAVLink properties of CSD are specified in the *CSD Configuration File*:
* The [\[mavlink\]](../guide/configuration_file.md#mavlink) section is used to specify the MAVLink destination UDP port, the broadcast address for heartbeat messages, and the system id (which should be set to match the autopilot).
The MAVLink properties of CSD are specified in the [CSD Configuration File](../guide/configuration_file.md):
* The [\[mavlink\]](../guide/configuration_file.md#mavlink) section is used to specify the MAVLink destination UDP port, the broadcast address for heartbeat messages, and (optionally) the system id.
* The [\[uri\]](../guide/configuration_file.md#uri) section specifies the device to URI mapping for [Camera Definition File](../guide/camera_definition_file.md).
* The [\[imgcap\]](../guide/configuration_file.md#imgcap) and [\[vidcap\]](../guide/configuration_file.md#vidcap) sections specify the *default settings* for image and video capture, respectively.

Component IDs for each camera are allocated automatically and sequentially from [MAV_COMP_ID_CAMERA2](https://mavlink.io/en/messages/common.html#MAV_COMP_ID_CAMERA2) to [MAV_COMP_ID_CAMERA6](https://mavlink.io/en/messages/common.html#MAV_COMP_ID_CAMERA6) (inclusive) as cameras are connected (once all component ids are allocated further cameras are not addressable).
All cameras share the same MAVLink system ID. This can (optionally) be defined in the configuration file to match the id of the associated autopilot. If the system id is not defined in the configuration file then CSD will initially use the default PX4 vehicle system ID (1) and then change to the id of the first autopilot it detects.

Component IDs for each camera are allocated automatically and sequentially from [MAV_COMP_ID_CAMERA](https://mavlink.io/en/messages/common.html#MAV_COMP_ID_CAMERA) as cameras are connected (once all component ids are allocated further cameras are not addressable). For Gazebo-enabled CSD builds the first ID is allocated to the Gazebo plugin camera.
Copy link

@lbegani lbegani Apr 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Gazebo-enabled CSD builds the first ID is allocated to the Gazebo plugin camera

Not sure, what it means

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I re-wrote as "When the CSD is built with Gazebo enabled, the Gazebo camera has component ID MAV_COMP_ID_CAMERA."


**Limitations:**

* At time of writing (March 2018) the camera protocol, and hence CSD, do not yet include a formal specification for managing or advertising RTSP video streams.
* The MAVLink protocol supports up to 6 cameras in a single system (only 6 `component_id` values are defined). Currently only 5 cameras can be accessed via CSD (see [#142](https://github.com/intel/camera-streaming-daemon/issues/142)).
* The MAVLink protocol supports up to 6 cameras in a single system (only 6 [camera component ids](https://mavlink.io/en/messages/common.html#MAV_COMP_ID_CAMERA) are defined). When CSD is configured for Gazebo one of these is reserved for the gazebo plugin camera.
* The default [image](../guide/configuration_file.md#imgcap) and [video](../guide/configuration_file.md#vidcap)
capture settings cannot (yet) be overwritten using parameters/via a [Camera Definition File](../guide/camera_definition_file.md) (see [#161](https://github.com/Dronecode/camera-streaming-daemon/issues/161)).