diff --git a/go/.gitignore b/go/.gitignore new file mode 100644 index 0000000..f2db883 --- /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 0000000..66947ad --- /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 0000000..ff1f88c --- /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 0000000..2e26fa5 --- /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 5cf6680..3012505 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 fa724d1..d957490 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 44da667..156049f 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 8964358..d86d5f0 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 e0d32dd..3a11df2 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 05e627b..114a96f 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 37e5ca5..ae00349 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 c4691f1..9f2d5df 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 c538ea5..e6e6b62 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 c8e0d58..267a4b0 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 c1affed..fcd8a5a 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 6743c6f..2935925 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 abe6178..d8a3596 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 018dd03..aaf8e5d 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 589499b..a516e2a 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 8693337..70f1c0c 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 44bd316..f5ab4ec 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 6ddbc59..f42cbe7 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 3c667a4..fa98ee7 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 27c47c2..fd7c6d0 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 2e8dbe7..24c9dcf 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 409def8..4554622 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 d94f125..5d612c6 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 d6724b6..39e572f 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 c443699..942072c 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 5c93902..ba81b6a 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 6104691..7cad8b0 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 ca1c920..678cb0e 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 bc11112..8b58828 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 155075d..89605db 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 73bca2d..499044e 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 5d29cd4..4b9bd87 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 e2bb876..4f1070b 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 de2aebd..4ddd743 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 1fee439..1e11849 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 a7ea756..d6448c9 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 090e395..7cf6e8e 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 f98d3a0..e7bd7ec 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 d9abdc7..8b3beec 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