From f45b7c62fa16e21e53bacfd8f7bc48ffe315de67 Mon Sep 17 00:00:00 2001 From: Joshua Chaitin-Pollak Date: Mon, 29 Apr 2024 17:36:55 -0400 Subject: [PATCH] initial pass at go-protobuf library --- go/.gitignore | 2 ++ go/generate.sh | 18 ++++++++++++ go/go.mod | 5 ++++ go/go.sum | 6 ++++ internal/generateProto.ts | 1 + schemas/proto/foxglove/ArrowPrimitive.proto | 2 ++ .../proto/foxglove/CameraCalibration.proto | 28 ++++++++++--------- schemas/proto/foxglove/CircleAnnotation.proto | 2 ++ schemas/proto/foxglove/Color.proto | 2 ++ schemas/proto/foxglove/CompressedImage.proto | 4 ++- schemas/proto/foxglove/CompressedVideo.proto | 8 ++++-- schemas/proto/foxglove/CubePrimitive.proto | 2 ++ .../proto/foxglove/CylinderPrimitive.proto | 2 ++ schemas/proto/foxglove/FrameTransform.proto | 2 ++ schemas/proto/foxglove/FrameTransforms.proto | 2 ++ schemas/proto/foxglove/GeoJSON.proto | 2 ++ schemas/proto/foxglove/Grid.proto | 2 ++ schemas/proto/foxglove/ImageAnnotations.proto | 2 ++ schemas/proto/foxglove/KeyValuePair.proto | 2 ++ schemas/proto/foxglove/LaserScan.proto | 2 ++ schemas/proto/foxglove/LinePrimitive.proto | 4 ++- schemas/proto/foxglove/LocationFix.proto | 2 ++ schemas/proto/foxglove/Log.proto | 2 ++ schemas/proto/foxglove/ModelPrimitive.proto | 2 ++ .../proto/foxglove/PackedElementField.proto | 2 ++ schemas/proto/foxglove/Point2.proto | 2 ++ schemas/proto/foxglove/Point3.proto | 2 ++ schemas/proto/foxglove/PointCloud.proto | 2 ++ schemas/proto/foxglove/PointsAnnotation.proto | 2 ++ schemas/proto/foxglove/Pose.proto | 2 ++ schemas/proto/foxglove/PoseInFrame.proto | 2 ++ schemas/proto/foxglove/PosesInFrame.proto | 2 ++ schemas/proto/foxglove/Quaternion.proto | 2 ++ schemas/proto/foxglove/RawImage.proto | 4 ++- schemas/proto/foxglove/SceneEntity.proto | 2 ++ .../proto/foxglove/SceneEntityDeletion.proto | 2 ++ schemas/proto/foxglove/SceneUpdate.proto | 2 ++ schemas/proto/foxglove/SpherePrimitive.proto | 2 ++ schemas/proto/foxglove/TextAnnotation.proto | 2 ++ schemas/proto/foxglove/TextPrimitive.proto | 2 ++ .../foxglove/TriangleListPrimitive.proto | 4 ++- schemas/proto/foxglove/Vector2.proto | 2 ++ schemas/proto/foxglove/Vector3.proto | 2 ++ 43 files changed, 128 insertions(+), 20 deletions(-) create mode 100644 go/.gitignore create mode 100644 go/generate.sh create mode 100644 go/go.mod create mode 100644 go/go.sum diff --git a/go/.gitignore b/go/.gitignore new file mode 100644 index 00000000..f2db8833 --- /dev/null +++ b/go/.gitignore @@ -0,0 +1,2 @@ + +github.com \ No newline at end of file diff --git a/go/generate.sh b/go/generate.sh new file mode 100644 index 00000000..66947ad2 --- /dev/null +++ b/go/generate.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# MacOS: +# brew install protobuf@3 +# export PATH="/opt/homebrew/opt/protobuf@3/bin:$PATH" +# export LDFLAGS="-L/opt/homebrew/opt/protobuf@3/lib" +# export CPPFLAGS="-I/opt/homebrew/opt/protobuf@3/include" + +# All Platforms: +# go install google.golang.org/protobuf/cmd/protoc-gen-go@latest +# go install github.com/goreleaser/goreleaser@latest +# export PATH="$PATH:$(go env GOPATH)/bin" + +PROJDIR=$(realpath "$(dirname "${BASH_SOURCE[0]}")") # Get the project directory + +cd "$PROJDIR" || exit 1 + +protoc --go_out=./ --proto_path=schemas/proto schemas/proto/**/*.proto --descriptor_set_out=/dev/null \ No newline at end of file diff --git a/go/go.mod b/go/go.mod new file mode 100644 index 00000000..ff1f88cf --- /dev/null +++ b/go/go.mod @@ -0,0 +1,5 @@ +module foxglove/schemas + +go 1.22 + +require google.golang.org/protobuf v1.33.0 diff --git a/go/go.sum b/go/go.sum new file mode 100644 index 00000000..2e26fa55 --- /dev/null +++ b/go/go.sum @@ -0,0 +1,6 @@ +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/internal/generateProto.ts b/internal/generateProto.ts index 5cf66800..3012505a 100644 --- a/internal/generateProto.ts +++ b/internal/generateProto.ts @@ -111,6 +111,7 @@ export function generateProto( const outputSections = [ `// Generated by https://github.com/foxglove/schemas`, 'syntax = "proto3";', + 'option go_package = "github.com/foxglove/schemas', Array.from(imports) .sort() diff --git a/schemas/proto/foxglove/ArrowPrimitive.proto b/schemas/proto/foxglove/ArrowPrimitive.proto index fa724d10..d9574900 100644 --- a/schemas/proto/foxglove/ArrowPrimitive.proto +++ b/schemas/proto/foxglove/ArrowPrimitive.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Pose.proto"; diff --git a/schemas/proto/foxglove/CameraCalibration.proto b/schemas/proto/foxglove/CameraCalibration.proto index 44da6674..156049fc 100644 --- a/schemas/proto/foxglove/CameraCalibration.proto +++ b/schemas/proto/foxglove/CameraCalibration.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "google/protobuf/timestamp.proto"; package foxglove; @@ -21,7 +23,7 @@ message CameraCalibration { fixed32 height = 3; // Name of distortion model - // + // // Supported parameters: `plumb_bob` (k1, k2, p1, p2, k3) and `rational_polynomial` (k1, k2, p1, p2, k3, k4, k5, k6). Distortion models are based on [OpenCV's](https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html) [pinhole camera model](https://en.wikipedia.org/wiki/Distortion_%28optics%29#Software_correction). This is the same [implementation used by ROS](http://docs.ros.org/en/diamondback/api/image_geometry/html/c++/pinhole__camera__model_8cpp_source.html) string distortion_model = 4; @@ -29,11 +31,11 @@ message CameraCalibration { repeated double D = 5; // Intrinsic camera matrix (3x3 row-major matrix) - // + // // A 3x3 row-major matrix for the raw (distorted) image. - // + // // Projects 3D points in the camera coordinate frame to 2D pixel coordinates using the focal lengths (fx, fy) and principal point (cx, cy). - // + // // ``` // [fx 0 cx] // K = [ 0 fy cy] @@ -42,34 +44,34 @@ message CameraCalibration { repeated double K = 6; // length 9 // Rectification matrix (stereo cameras only, 3x3 row-major matrix) - // + // // A rotation matrix aligning the camera coordinate system to the ideal stereo image plane so that epipolar lines in both stereo images are parallel. repeated double R = 7; // length 9 // Projection/camera matrix (3x4 row-major matrix) - // + // // ``` // [fx' 0 cx' Tx] // P = [ 0 fy' cy' Ty] // [ 0 0 1 0] // ``` - // + // // By convention, this matrix specifies the intrinsic (camera) matrix of the processed (rectified) image. That is, the left 3x3 portion is the normal camera intrinsic matrix for the rectified image. - // + // // It projects 3D points in the camera coordinate frame to 2D pixel coordinates using the focal lengths (fx', fy') and principal point (cx', cy') - these may differ from the values in K. - // + // // For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will also have R = the identity and P[1:3,1:3] = K. - // + // // For a stereo pair, the fourth column [Tx Ty 0]' is related to the position of the optical center of the second camera in the first camera's frame. We assume Tz = 0 so both cameras are in the same stereo image plane. The first camera always has Tx = Ty = 0. For the right (second) camera of a horizontal stereo pair, Ty = 0 and Tx = -fx' * B, where B is the baseline between the cameras. - // + // // Given a 3D point [X Y Z]', the projection (x, y) of the point onto the rectified image is given by: - // + // // ``` // [u v w]' = P * [X Y Z 1]' // x = u / w // y = v / w // ``` - // + // // This holds for both images of a stereo pair. repeated double P = 8; // length 12 } diff --git a/schemas/proto/foxglove/CircleAnnotation.proto b/schemas/proto/foxglove/CircleAnnotation.proto index 89643583..d86d5f06 100644 --- a/schemas/proto/foxglove/CircleAnnotation.proto +++ b/schemas/proto/foxglove/CircleAnnotation.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Point2.proto"; import "google/protobuf/timestamp.proto"; diff --git a/schemas/proto/foxglove/Color.proto b/schemas/proto/foxglove/Color.proto index e0d32dd6..3a11df2b 100644 --- a/schemas/proto/foxglove/Color.proto +++ b/schemas/proto/foxglove/Color.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + package foxglove; // A color in RGBA format diff --git a/schemas/proto/foxglove/CompressedImage.proto b/schemas/proto/foxglove/CompressedImage.proto index 05e627b1..114a96f5 100644 --- a/schemas/proto/foxglove/CompressedImage.proto +++ b/schemas/proto/foxglove/CompressedImage.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "google/protobuf/timestamp.proto"; package foxglove; @@ -18,7 +20,7 @@ message CompressedImage { bytes data = 2; // Image format - // + // // Supported values: image media types supported by Chrome, such as `webp`, `jpeg`, `png` string format = 3; } diff --git a/schemas/proto/foxglove/CompressedVideo.proto b/schemas/proto/foxglove/CompressedVideo.proto index 37e5ca50..ae00349f 100644 --- a/schemas/proto/foxglove/CompressedVideo.proto +++ b/schemas/proto/foxglove/CompressedVideo.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "google/protobuf/timestamp.proto"; package foxglove; @@ -12,17 +14,17 @@ message CompressedVideo { google.protobuf.Timestamp timestamp = 1; // Frame of reference for the video. - // + // // The origin of the frame is the optical center of the camera. +x points to the right in the video, +y points down, and +z points into the plane of the video. string frame_id = 2; // Compressed video frame data. - // + // // For packet-based video codecs this data must begin and end on packet boundaries (no partial packets), and must contain enough video packets to decode exactly one image (either a keyframe or delta frame). Note: Foxglove does not support video streams that include B frames because they require lookahead. bytes data = 3; // Video format. - // + // // Supported values: `h264` (Annex B formatted data only) string format = 4; } diff --git a/schemas/proto/foxglove/CubePrimitive.proto b/schemas/proto/foxglove/CubePrimitive.proto index c4691f1e..9f2d5df1 100644 --- a/schemas/proto/foxglove/CubePrimitive.proto +++ b/schemas/proto/foxglove/CubePrimitive.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Pose.proto"; import "foxglove/Vector3.proto"; diff --git a/schemas/proto/foxglove/CylinderPrimitive.proto b/schemas/proto/foxglove/CylinderPrimitive.proto index c538ea59..e6e6b626 100644 --- a/schemas/proto/foxglove/CylinderPrimitive.proto +++ b/schemas/proto/foxglove/CylinderPrimitive.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Pose.proto"; import "foxglove/Vector3.proto"; diff --git a/schemas/proto/foxglove/FrameTransform.proto b/schemas/proto/foxglove/FrameTransform.proto index c8e0d58b..267a4b05 100644 --- a/schemas/proto/foxglove/FrameTransform.proto +++ b/schemas/proto/foxglove/FrameTransform.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Quaternion.proto"; import "foxglove/Vector3.proto"; import "google/protobuf/timestamp.proto"; diff --git a/schemas/proto/foxglove/FrameTransforms.proto b/schemas/proto/foxglove/FrameTransforms.proto index c1affed5..fcd8a5a3 100644 --- a/schemas/proto/foxglove/FrameTransforms.proto +++ b/schemas/proto/foxglove/FrameTransforms.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/FrameTransform.proto"; package foxglove; diff --git a/schemas/proto/foxglove/GeoJSON.proto b/schemas/proto/foxglove/GeoJSON.proto index 6743c6fa..29359258 100644 --- a/schemas/proto/foxglove/GeoJSON.proto +++ b/schemas/proto/foxglove/GeoJSON.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + package foxglove; // GeoJSON data for annotating maps diff --git a/schemas/proto/foxglove/Grid.proto b/schemas/proto/foxglove/Grid.proto index abe61785..d8a35960 100644 --- a/schemas/proto/foxglove/Grid.proto +++ b/schemas/proto/foxglove/Grid.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/PackedElementField.proto"; import "foxglove/Pose.proto"; import "foxglove/Vector2.proto"; diff --git a/schemas/proto/foxglove/ImageAnnotations.proto b/schemas/proto/foxglove/ImageAnnotations.proto index 018dd03e..aaf8e5da 100644 --- a/schemas/proto/foxglove/ImageAnnotations.proto +++ b/schemas/proto/foxglove/ImageAnnotations.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/CircleAnnotation.proto"; import "foxglove/PointsAnnotation.proto"; import "foxglove/TextAnnotation.proto"; diff --git a/schemas/proto/foxglove/KeyValuePair.proto b/schemas/proto/foxglove/KeyValuePair.proto index 589499bb..a516e2a5 100644 --- a/schemas/proto/foxglove/KeyValuePair.proto +++ b/schemas/proto/foxglove/KeyValuePair.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + package foxglove; // A key with its associated value diff --git a/schemas/proto/foxglove/LaserScan.proto b/schemas/proto/foxglove/LaserScan.proto index 86933370..70f1c0c7 100644 --- a/schemas/proto/foxglove/LaserScan.proto +++ b/schemas/proto/foxglove/LaserScan.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Pose.proto"; import "google/protobuf/timestamp.proto"; diff --git a/schemas/proto/foxglove/LinePrimitive.proto b/schemas/proto/foxglove/LinePrimitive.proto index 44bd3168..f5ab4ec4 100644 --- a/schemas/proto/foxglove/LinePrimitive.proto +++ b/schemas/proto/foxglove/LinePrimitive.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Point3.proto"; import "foxglove/Pose.proto"; @@ -43,7 +45,7 @@ message LinePrimitive { repeated foxglove.Color colors = 7; // Indices into the `points` and `colors` attribute arrays, which can be used to avoid duplicating attribute data. - // + // // If omitted or empty, indexing will not be used. This default behavior is equivalent to specifying [0, 1, ..., N-1] for the indices (where N is the number of `points` provided). repeated fixed32 indices = 8; } diff --git a/schemas/proto/foxglove/LocationFix.proto b/schemas/proto/foxglove/LocationFix.proto index 6ddbc59a..f42cbe7f 100644 --- a/schemas/proto/foxglove/LocationFix.proto +++ b/schemas/proto/foxglove/LocationFix.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove/Log.proto b/schemas/proto/foxglove/Log.proto index 3c667a45..fa98ee7d 100644 --- a/schemas/proto/foxglove/Log.proto +++ b/schemas/proto/foxglove/Log.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove/ModelPrimitive.proto b/schemas/proto/foxglove/ModelPrimitive.proto index 27c47c2d..fd7c6d00 100644 --- a/schemas/proto/foxglove/ModelPrimitive.proto +++ b/schemas/proto/foxglove/ModelPrimitive.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Pose.proto"; import "foxglove/Vector3.proto"; diff --git a/schemas/proto/foxglove/PackedElementField.proto b/schemas/proto/foxglove/PackedElementField.proto index 2e8dbe73..24c9dcfb 100644 --- a/schemas/proto/foxglove/PackedElementField.proto +++ b/schemas/proto/foxglove/PackedElementField.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + package foxglove; // A field present within each element in a byte array of packed elements. diff --git a/schemas/proto/foxglove/Point2.proto b/schemas/proto/foxglove/Point2.proto index 409def8b..4554622f 100644 --- a/schemas/proto/foxglove/Point2.proto +++ b/schemas/proto/foxglove/Point2.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + package foxglove; // A point representing a position in 2D space diff --git a/schemas/proto/foxglove/Point3.proto b/schemas/proto/foxglove/Point3.proto index d94f1250..5d612c6b 100644 --- a/schemas/proto/foxglove/Point3.proto +++ b/schemas/proto/foxglove/Point3.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + package foxglove; // A point representing a position in 3D space diff --git a/schemas/proto/foxglove/PointCloud.proto b/schemas/proto/foxglove/PointCloud.proto index d6724b67..39e572f4 100644 --- a/schemas/proto/foxglove/PointCloud.proto +++ b/schemas/proto/foxglove/PointCloud.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/PackedElementField.proto"; import "foxglove/Pose.proto"; import "google/protobuf/timestamp.proto"; diff --git a/schemas/proto/foxglove/PointsAnnotation.proto b/schemas/proto/foxglove/PointsAnnotation.proto index c4436994..942072c6 100644 --- a/schemas/proto/foxglove/PointsAnnotation.proto +++ b/schemas/proto/foxglove/PointsAnnotation.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Point2.proto"; import "google/protobuf/timestamp.proto"; diff --git a/schemas/proto/foxglove/Pose.proto b/schemas/proto/foxglove/Pose.proto index 5c93902c..ba81b6a9 100644 --- a/schemas/proto/foxglove/Pose.proto +++ b/schemas/proto/foxglove/Pose.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Quaternion.proto"; import "foxglove/Vector3.proto"; diff --git a/schemas/proto/foxglove/PoseInFrame.proto b/schemas/proto/foxglove/PoseInFrame.proto index 61046915..7cad8b06 100644 --- a/schemas/proto/foxglove/PoseInFrame.proto +++ b/schemas/proto/foxglove/PoseInFrame.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Pose.proto"; import "google/protobuf/timestamp.proto"; diff --git a/schemas/proto/foxglove/PosesInFrame.proto b/schemas/proto/foxglove/PosesInFrame.proto index ca1c920a..678cb0ec 100644 --- a/schemas/proto/foxglove/PosesInFrame.proto +++ b/schemas/proto/foxglove/PosesInFrame.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Pose.proto"; import "google/protobuf/timestamp.proto"; diff --git a/schemas/proto/foxglove/Quaternion.proto b/schemas/proto/foxglove/Quaternion.proto index bc111125..8b58828f 100644 --- a/schemas/proto/foxglove/Quaternion.proto +++ b/schemas/proto/foxglove/Quaternion.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + package foxglove; // A [quaternion](https://eater.net/quaternions) representing a rotation in 3D space diff --git a/schemas/proto/foxglove/RawImage.proto b/schemas/proto/foxglove/RawImage.proto index 155075d8..89605db7 100644 --- a/schemas/proto/foxglove/RawImage.proto +++ b/schemas/proto/foxglove/RawImage.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "google/protobuf/timestamp.proto"; package foxglove; @@ -21,7 +23,7 @@ message RawImage { fixed32 height = 3; // Encoding of the raw image data - // + // // Supported values: `8UC1`, `8UC3`, `16UC1`, `32FC1`, `bayer_bggr8`, `bayer_gbrg8`, `bayer_grbg8`, `bayer_rggb8`, `bgr8`, `bgra8`, `mono8`, `mono16`, `rgb8`, `rgba8`, `uyvy` or `yuv422`, `yuyv` or `yuv422_yuy2` string encoding = 4; diff --git a/schemas/proto/foxglove/SceneEntity.proto b/schemas/proto/foxglove/SceneEntity.proto index 73bca2dd..499044ee 100644 --- a/schemas/proto/foxglove/SceneEntity.proto +++ b/schemas/proto/foxglove/SceneEntity.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/ArrowPrimitive.proto"; import "foxglove/CubePrimitive.proto"; import "foxglove/CylinderPrimitive.proto"; diff --git a/schemas/proto/foxglove/SceneEntityDeletion.proto b/schemas/proto/foxglove/SceneEntityDeletion.proto index 5d29cd40..4b9bd872 100644 --- a/schemas/proto/foxglove/SceneEntityDeletion.proto +++ b/schemas/proto/foxglove/SceneEntityDeletion.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove/SceneUpdate.proto b/schemas/proto/foxglove/SceneUpdate.proto index e2bb8764..4f1070ba 100644 --- a/schemas/proto/foxglove/SceneUpdate.proto +++ b/schemas/proto/foxglove/SceneUpdate.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/SceneEntity.proto"; import "foxglove/SceneEntityDeletion.proto"; diff --git a/schemas/proto/foxglove/SpherePrimitive.proto b/schemas/proto/foxglove/SpherePrimitive.proto index de2aebd7..4ddd7436 100644 --- a/schemas/proto/foxglove/SpherePrimitive.proto +++ b/schemas/proto/foxglove/SpherePrimitive.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Pose.proto"; import "foxglove/Vector3.proto"; diff --git a/schemas/proto/foxglove/TextAnnotation.proto b/schemas/proto/foxglove/TextAnnotation.proto index 1fee439f..1e11849a 100644 --- a/schemas/proto/foxglove/TextAnnotation.proto +++ b/schemas/proto/foxglove/TextAnnotation.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Point2.proto"; import "google/protobuf/timestamp.proto"; diff --git a/schemas/proto/foxglove/TextPrimitive.proto b/schemas/proto/foxglove/TextPrimitive.proto index a7ea7569..d6448c97 100644 --- a/schemas/proto/foxglove/TextPrimitive.proto +++ b/schemas/proto/foxglove/TextPrimitive.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Pose.proto"; diff --git a/schemas/proto/foxglove/TriangleListPrimitive.proto b/schemas/proto/foxglove/TriangleListPrimitive.proto index 090e3956..7cf6e8e3 100644 --- a/schemas/proto/foxglove/TriangleListPrimitive.proto +++ b/schemas/proto/foxglove/TriangleListPrimitive.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + import "foxglove/Color.proto"; import "foxglove/Point3.proto"; import "foxglove/Pose.proto"; @@ -23,7 +25,7 @@ message TriangleListPrimitive { repeated foxglove.Color colors = 4; // Indices into the `points` and `colors` attribute arrays, which can be used to avoid duplicating attribute data. - // + // // If omitted or empty, indexing will not be used. This default behavior is equivalent to specifying [0, 1, ..., N-1] for the indices (where N is the number of `points` provided). repeated fixed32 indices = 5; } diff --git a/schemas/proto/foxglove/Vector2.proto b/schemas/proto/foxglove/Vector2.proto index f98d3a0c..e7bd7ecb 100644 --- a/schemas/proto/foxglove/Vector2.proto +++ b/schemas/proto/foxglove/Vector2.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + package foxglove; // A vector in 2D space that represents a direction only diff --git a/schemas/proto/foxglove/Vector3.proto b/schemas/proto/foxglove/Vector3.proto index d9abdc76..8b3beec1 100644 --- a/schemas/proto/foxglove/Vector3.proto +++ b/schemas/proto/foxglove/Vector3.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "github.com/foxglove/schemas"; + package foxglove; // A vector in 3D space that represents a direction only