Skip to content

Commit

Permalink
Merge branch 'auger-proto' of https://github.com/BinghamtonRover/Prot…
Browse files Browse the repository at this point in the history
…obuf into auger-proto
  • Loading branch information
ruari-r committed Feb 13, 2025
2 parents 788f35a + a144cf8 commit e648f2c
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 11 deletions.
18 changes: 18 additions & 0 deletions arm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ message ArmCommand {
Version version = 11;
}

message AugerData {
int32 speedActual = 1;
BoolState augerOn = 2;
}

message GripperData {
MotorData lift = 1;
MotorData rotate = 2;
Expand All @@ -50,6 +55,17 @@ message GripperData {
Version version = 4;
int32 servoAngle = 5;
BoolState laserState = 6;

AugerData augerData = 7;
}

message AugerCommand {
float augerSpeed = 1;

// Indicates that [augerSpeed] = 0 is valid, even though 0 usually means no value.
bool speedSet = 2;

BoolState augerOn = 3;
}

message GripperCommand {
Expand All @@ -70,4 +86,6 @@ message GripperCommand {
Version version = 9;
int32 servoAngle = 10;
BoolState laserState = 11;

AugerCommand auger = 12;
}
2 changes: 2 additions & 0 deletions core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ enum Device {
RELAY = 10;
BASE_STATION = 11;
ANTENNA = 12;
VISION = 13;
LIDAR = 14;
}
19 changes: 19 additions & 0 deletions lidar.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Version 1.0
syntax = "proto3";
import "version.proto";

message LidarCartesianPoint {
float x = 1;
float y = 2;
}

message LidarPolarPoint {
float angle = 1;
float distance = 2;
}

message LidarPointCloud {
repeated LidarCartesianPoint cartesian = 1;
repeated LidarPolarPoint polar = 2;
Version version = 3;
}
8 changes: 7 additions & 1 deletion video.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Version: 1.1
// Version: 1.2

syntax = "proto3";
import "version.proto";
import "vision.proto";

enum CameraStatus {
CAMERA_STATUS_UNDEFINED = 0;
Expand Down Expand Up @@ -78,9 +79,14 @@ message VideoData {
/// The latest frame from this camera.
bytes frame = 3;

/// The version of this video data.
Version version = 4;

/// The path that a high-quality screenshot was saved to.
string imagePath = 5;

/// Any objects that were detected in the frame.
repeated DetectedObject detectedObjects = 6;
}

/// Make changes to a camera feed.
Expand Down
21 changes: 11 additions & 10 deletions vision.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Version: 1.0
// Version: 2.0

syntax = "proto3";

import "geometry.proto";
import "video.proto";

enum DetectedObjectType {
DETECTION_TYPE_UNDEFINED = 0;
Expand All @@ -13,25 +12,27 @@ enum DetectedObjectType {
}

message PnpResult {
Pose3d pose = 1;
double error = 2;
Pose3d cameraToTarget = 1;
double reprojectionError = 2;
}

message DetectedObject {
// What was detected
DetectedObjectType objectType = 1;
int32 arucoTagId = 2;
CameraName camera = 3;

// Where it was detected
float xPosition = 4; // -1 to +1 (left to right)
float relativeSize = 5; // 0 to 1 (percent of frame)

// Experimental: Use pinhole model to find the object's position
float yaw = 6;
float pitch = 7;
int32 centerX = 6;
int32 centerY = 7;

// Experimental: Use pinhole camera model to find the object's position
float yaw = 8;
float pitch = 9;

// Experimental: Use PnP to determine the 3D pose
PnpResult bestPnpResult = 8;
PnpResult alternatePnpResult = 9;
PnpResult bestPnpResult = 10;
PnpResult alternatePnpResult = 11;
}

0 comments on commit e648f2c

Please sign in to comment.