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

Capability flags in camera information #329

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
91 changes: 90 additions & 1 deletion protos/camera_server/camera_server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "mavsdk_options.proto";
option java_package = "io.mavsdk.camera_server";
option java_outer_classname = "CameraServerProto";

// Provides handling of camera trigger commands.
// Provides handling of camera interface
service CameraServerService {
// Sets the camera information. This must be called as soon as the camera server is created.
rpc SetInformation(SetInformationRequest) returns(SetInformationResponse) { option (mavsdk.options.async_type) = SYNC; }
Expand Down Expand Up @@ -101,8 +101,33 @@ service CameraServerService {

// Respond to zoom range.
rpc RespondZoomRange(RespondZoomRangeRequest) returns(RespondZoomRangeResponse) { option (mavsdk.options.async_type) = SYNC; }

// Set/update the current rectangle tracking status.
rpc SetTrackingRectangleStatus(SetTrackingRectangleStatusRequest) returns(SetTrackingRectangleStatusResponse) { option (mavsdk.options.async_type) = SYNC; }

// Set the current tracking status to off.
rpc SetTrackingOffStatus(SetTrackingOffStatusRequest) returns(SetTrackingOffStatusResponse) { option (mavsdk.options.async_type) = SYNC; }

// Subscribe to incoming tracking point command.
rpc SubscribeTrackingPointCommand(SubscribeTrackingPointCommandRequest) returns(stream TrackingPointCommandResponse) { option (mavsdk.options.async_type) = ASYNC; }

// Subscribe to incoming tracking rectangle command.
rpc SubscribeTrackingRectangleCommand(SubscribeTrackingRectangleCommandRequest) returns(stream TrackingRectangleCommandResponse) { option (mavsdk.options.async_type) = ASYNC; }

// Subscribe to incoming tracking off command.
rpc SubscribeTrackingOffCommand(SubscribeTrackingOffCommandRequest) returns(stream TrackingOffCommandResponse) { option (mavsdk.options.async_type) = ASYNC; }

// Respond to an incoming tracking point command.
rpc RespondTrackingPointCommand(RespondTrackingPointCommandRequest) returns(RespondTrackingPointCommandResponse) { option (mavsdk.options.async_type) = SYNC; }

// Respond to an incoming tracking rectangle command.
rpc RespondTrackingRectangleCommand(RespondTrackingRectangleCommandRequest) returns(RespondTrackingRectangleCommandResponse) { option (mavsdk.options.async_type) = SYNC; }

// Respond to an incoming tracking off command.
rpc RespondTrackingOffCommand(RespondTrackingOffCommandRequest) returns(RespondTrackingOffCommandResponse) { option (mavsdk.options.async_type) = SYNC; }
}


message SetInformationRequest {
Information information = 1; // information about the camera
}
Expand Down Expand Up @@ -440,3 +465,67 @@ message CaptureStatus {
VideoStatus video_status = 5; // Current status of video capturing
int32 image_count = 6; // Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)
}

message SetTrackingPointStatusRequest {
TrackPoint tracked_point = 1; // The tracked point
}
message SetTrackingPointStatusResponse {}

message SetTrackingRectangleStatusRequest {
TrackRectangle tracked_rectangle = 1; // The tracked rectangle
}
message SetTrackingRectangleStatusResponse {}

message SetTrackingOffStatusRequest {}
message SetTrackingOffStatusResponse {}

message SubscribeTrackingPointCommandRequest {}
message TrackingPointCommandResponse {
TrackPoint track_point = 1; // The point to track if a point is to be tracked
}

message SubscribeTrackingRectangleCommandRequest {}
message TrackingRectangleCommandResponse {
TrackRectangle track_rectangle = 1; // The point to track if a point is to be tracked
}

message SubscribeTrackingOffCommandRequest {}
message TrackingOffCommandResponse {
int32 dummy = 1; // Unused
}

message RespondTrackingPointCommandRequest {
CameraFeedback stop_video_feedback = 1; // the feedback
}
message RespondTrackingPointCommandResponse {
CameraServerResult camera_server_result = 1; // The result of sending the response.
}

message RespondTrackingRectangleCommandRequest {
CameraFeedback stop_video_feedback = 1; // the feedback
}
message RespondTrackingRectangleCommandResponse {
CameraServerResult camera_server_result = 1; // The result of sending the response.
}

message RespondTrackingOffCommandRequest {
CameraFeedback stop_video_feedback = 1; // the feedback
}
message RespondTrackingOffCommandResponse {
CameraServerResult camera_server_result = 1; // The result of sending the response.
}

// Point description type
message TrackPoint {
float point_x = 1; // Point to track x value (normalized 0..1, 0 is left, 1 is right).
float point_y = 2; // Point to track y value (normalized 0..1, 0 is top, 1 is bottom).
float radius = 3; // Point to track y value (normalized 0..1, 0 is top, 1 is bottom).
}

// Rectangle description type
message TrackRectangle {
float top_left_corner_x = 1; // Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).
float top_left_corner_y = 2; // Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).
float bottom_right_corner_x = 3; // Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).
float bottom_right_corner_y = 4; // Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).
}
117 changes: 0 additions & 117 deletions protos/tracking_server/tracking_server.proto

This file was deleted.

Loading