From ca3c75afc2c6114740a4341b2818a6aa31c5e79b Mon Sep 17 00:00:00 2001 From: Devon Rueckner Date: Fri, 23 Feb 2024 15:42:43 -0500 Subject: [PATCH 1/4] rename proto dir --- .../{foxglove => foxglove_schemas_protobuf}/ArrowPrimitive.proto | 0 .../CameraCalibration.proto | 0 .../CircleAnnotation.proto | 0 schemas/proto/{foxglove => foxglove_schemas_protobuf}/Color.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/CompressedImage.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/CompressedVideo.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/CubePrimitive.proto | 0 .../CylinderPrimitive.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/FrameTransform.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/FrameTransforms.proto | 0 .../proto/{foxglove => foxglove_schemas_protobuf}/GeoJSON.proto | 0 schemas/proto/{foxglove => foxglove_schemas_protobuf}/Grid.proto | 0 .../ImageAnnotations.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/KeyValuePair.proto | 0 .../proto/{foxglove => foxglove_schemas_protobuf}/LaserScan.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/LinePrimitive.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/LocationFix.proto | 0 schemas/proto/{foxglove => foxglove_schemas_protobuf}/Log.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/ModelPrimitive.proto | 0 .../PackedElementField.proto | 0 .../proto/{foxglove => foxglove_schemas_protobuf}/Point2.proto | 0 .../proto/{foxglove => foxglove_schemas_protobuf}/Point3.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/PointCloud.proto | 0 .../PointsAnnotation.proto | 0 schemas/proto/{foxglove => foxglove_schemas_protobuf}/Pose.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/PoseInFrame.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/PosesInFrame.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/Quaternion.proto | 0 .../proto/{foxglove => foxglove_schemas_protobuf}/RawImage.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/SceneEntity.proto | 0 .../SceneEntityDeletion.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/SceneUpdate.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/SpherePrimitive.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/TextAnnotation.proto | 0 .../{foxglove => foxglove_schemas_protobuf}/TextPrimitive.proto | 0 .../TriangleListPrimitive.proto | 0 .../proto/{foxglove => foxglove_schemas_protobuf}/Vector2.proto | 0 .../proto/{foxglove => foxglove_schemas_protobuf}/Vector3.proto | 0 38 files changed, 0 insertions(+), 0 deletions(-) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/ArrowPrimitive.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/CameraCalibration.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/CircleAnnotation.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/Color.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/CompressedImage.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/CompressedVideo.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/CubePrimitive.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/CylinderPrimitive.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/FrameTransform.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/FrameTransforms.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/GeoJSON.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/Grid.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/ImageAnnotations.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/KeyValuePair.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/LaserScan.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/LinePrimitive.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/LocationFix.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/Log.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/ModelPrimitive.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/PackedElementField.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/Point2.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/Point3.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/PointCloud.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/PointsAnnotation.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/Pose.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/PoseInFrame.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/PosesInFrame.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/Quaternion.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/RawImage.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/SceneEntity.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/SceneEntityDeletion.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/SceneUpdate.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/SpherePrimitive.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/TextAnnotation.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/TextPrimitive.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/TriangleListPrimitive.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/Vector2.proto (100%) rename schemas/proto/{foxglove => foxglove_schemas_protobuf}/Vector3.proto (100%) diff --git a/schemas/proto/foxglove/ArrowPrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/ArrowPrimitive.proto similarity index 100% rename from schemas/proto/foxglove/ArrowPrimitive.proto rename to schemas/proto/foxglove_schemas_protobuf/ArrowPrimitive.proto diff --git a/schemas/proto/foxglove/CameraCalibration.proto b/schemas/proto/foxglove_schemas_protobuf/CameraCalibration.proto similarity index 100% rename from schemas/proto/foxglove/CameraCalibration.proto rename to schemas/proto/foxglove_schemas_protobuf/CameraCalibration.proto diff --git a/schemas/proto/foxglove/CircleAnnotation.proto b/schemas/proto/foxglove_schemas_protobuf/CircleAnnotation.proto similarity index 100% rename from schemas/proto/foxglove/CircleAnnotation.proto rename to schemas/proto/foxglove_schemas_protobuf/CircleAnnotation.proto diff --git a/schemas/proto/foxglove/Color.proto b/schemas/proto/foxglove_schemas_protobuf/Color.proto similarity index 100% rename from schemas/proto/foxglove/Color.proto rename to schemas/proto/foxglove_schemas_protobuf/Color.proto diff --git a/schemas/proto/foxglove/CompressedImage.proto b/schemas/proto/foxglove_schemas_protobuf/CompressedImage.proto similarity index 100% rename from schemas/proto/foxglove/CompressedImage.proto rename to schemas/proto/foxglove_schemas_protobuf/CompressedImage.proto diff --git a/schemas/proto/foxglove/CompressedVideo.proto b/schemas/proto/foxglove_schemas_protobuf/CompressedVideo.proto similarity index 100% rename from schemas/proto/foxglove/CompressedVideo.proto rename to schemas/proto/foxglove_schemas_protobuf/CompressedVideo.proto diff --git a/schemas/proto/foxglove/CubePrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/CubePrimitive.proto similarity index 100% rename from schemas/proto/foxglove/CubePrimitive.proto rename to schemas/proto/foxglove_schemas_protobuf/CubePrimitive.proto diff --git a/schemas/proto/foxglove/CylinderPrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/CylinderPrimitive.proto similarity index 100% rename from schemas/proto/foxglove/CylinderPrimitive.proto rename to schemas/proto/foxglove_schemas_protobuf/CylinderPrimitive.proto diff --git a/schemas/proto/foxglove/FrameTransform.proto b/schemas/proto/foxglove_schemas_protobuf/FrameTransform.proto similarity index 100% rename from schemas/proto/foxglove/FrameTransform.proto rename to schemas/proto/foxglove_schemas_protobuf/FrameTransform.proto diff --git a/schemas/proto/foxglove/FrameTransforms.proto b/schemas/proto/foxglove_schemas_protobuf/FrameTransforms.proto similarity index 100% rename from schemas/proto/foxglove/FrameTransforms.proto rename to schemas/proto/foxglove_schemas_protobuf/FrameTransforms.proto diff --git a/schemas/proto/foxglove/GeoJSON.proto b/schemas/proto/foxglove_schemas_protobuf/GeoJSON.proto similarity index 100% rename from schemas/proto/foxglove/GeoJSON.proto rename to schemas/proto/foxglove_schemas_protobuf/GeoJSON.proto diff --git a/schemas/proto/foxglove/Grid.proto b/schemas/proto/foxglove_schemas_protobuf/Grid.proto similarity index 100% rename from schemas/proto/foxglove/Grid.proto rename to schemas/proto/foxglove_schemas_protobuf/Grid.proto diff --git a/schemas/proto/foxglove/ImageAnnotations.proto b/schemas/proto/foxglove_schemas_protobuf/ImageAnnotations.proto similarity index 100% rename from schemas/proto/foxglove/ImageAnnotations.proto rename to schemas/proto/foxglove_schemas_protobuf/ImageAnnotations.proto diff --git a/schemas/proto/foxglove/KeyValuePair.proto b/schemas/proto/foxglove_schemas_protobuf/KeyValuePair.proto similarity index 100% rename from schemas/proto/foxglove/KeyValuePair.proto rename to schemas/proto/foxglove_schemas_protobuf/KeyValuePair.proto diff --git a/schemas/proto/foxglove/LaserScan.proto b/schemas/proto/foxglove_schemas_protobuf/LaserScan.proto similarity index 100% rename from schemas/proto/foxglove/LaserScan.proto rename to schemas/proto/foxglove_schemas_protobuf/LaserScan.proto diff --git a/schemas/proto/foxglove/LinePrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/LinePrimitive.proto similarity index 100% rename from schemas/proto/foxglove/LinePrimitive.proto rename to schemas/proto/foxglove_schemas_protobuf/LinePrimitive.proto diff --git a/schemas/proto/foxglove/LocationFix.proto b/schemas/proto/foxglove_schemas_protobuf/LocationFix.proto similarity index 100% rename from schemas/proto/foxglove/LocationFix.proto rename to schemas/proto/foxglove_schemas_protobuf/LocationFix.proto diff --git a/schemas/proto/foxglove/Log.proto b/schemas/proto/foxglove_schemas_protobuf/Log.proto similarity index 100% rename from schemas/proto/foxglove/Log.proto rename to schemas/proto/foxglove_schemas_protobuf/Log.proto diff --git a/schemas/proto/foxglove/ModelPrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/ModelPrimitive.proto similarity index 100% rename from schemas/proto/foxglove/ModelPrimitive.proto rename to schemas/proto/foxglove_schemas_protobuf/ModelPrimitive.proto diff --git a/schemas/proto/foxglove/PackedElementField.proto b/schemas/proto/foxglove_schemas_protobuf/PackedElementField.proto similarity index 100% rename from schemas/proto/foxglove/PackedElementField.proto rename to schemas/proto/foxglove_schemas_protobuf/PackedElementField.proto diff --git a/schemas/proto/foxglove/Point2.proto b/schemas/proto/foxglove_schemas_protobuf/Point2.proto similarity index 100% rename from schemas/proto/foxglove/Point2.proto rename to schemas/proto/foxglove_schemas_protobuf/Point2.proto diff --git a/schemas/proto/foxglove/Point3.proto b/schemas/proto/foxglove_schemas_protobuf/Point3.proto similarity index 100% rename from schemas/proto/foxglove/Point3.proto rename to schemas/proto/foxglove_schemas_protobuf/Point3.proto diff --git a/schemas/proto/foxglove/PointCloud.proto b/schemas/proto/foxglove_schemas_protobuf/PointCloud.proto similarity index 100% rename from schemas/proto/foxglove/PointCloud.proto rename to schemas/proto/foxglove_schemas_protobuf/PointCloud.proto diff --git a/schemas/proto/foxglove/PointsAnnotation.proto b/schemas/proto/foxglove_schemas_protobuf/PointsAnnotation.proto similarity index 100% rename from schemas/proto/foxglove/PointsAnnotation.proto rename to schemas/proto/foxglove_schemas_protobuf/PointsAnnotation.proto diff --git a/schemas/proto/foxglove/Pose.proto b/schemas/proto/foxglove_schemas_protobuf/Pose.proto similarity index 100% rename from schemas/proto/foxglove/Pose.proto rename to schemas/proto/foxglove_schemas_protobuf/Pose.proto diff --git a/schemas/proto/foxglove/PoseInFrame.proto b/schemas/proto/foxglove_schemas_protobuf/PoseInFrame.proto similarity index 100% rename from schemas/proto/foxglove/PoseInFrame.proto rename to schemas/proto/foxglove_schemas_protobuf/PoseInFrame.proto diff --git a/schemas/proto/foxglove/PosesInFrame.proto b/schemas/proto/foxglove_schemas_protobuf/PosesInFrame.proto similarity index 100% rename from schemas/proto/foxglove/PosesInFrame.proto rename to schemas/proto/foxglove_schemas_protobuf/PosesInFrame.proto diff --git a/schemas/proto/foxglove/Quaternion.proto b/schemas/proto/foxglove_schemas_protobuf/Quaternion.proto similarity index 100% rename from schemas/proto/foxglove/Quaternion.proto rename to schemas/proto/foxglove_schemas_protobuf/Quaternion.proto diff --git a/schemas/proto/foxglove/RawImage.proto b/schemas/proto/foxglove_schemas_protobuf/RawImage.proto similarity index 100% rename from schemas/proto/foxglove/RawImage.proto rename to schemas/proto/foxglove_schemas_protobuf/RawImage.proto diff --git a/schemas/proto/foxglove/SceneEntity.proto b/schemas/proto/foxglove_schemas_protobuf/SceneEntity.proto similarity index 100% rename from schemas/proto/foxglove/SceneEntity.proto rename to schemas/proto/foxglove_schemas_protobuf/SceneEntity.proto diff --git a/schemas/proto/foxglove/SceneEntityDeletion.proto b/schemas/proto/foxglove_schemas_protobuf/SceneEntityDeletion.proto similarity index 100% rename from schemas/proto/foxglove/SceneEntityDeletion.proto rename to schemas/proto/foxglove_schemas_protobuf/SceneEntityDeletion.proto diff --git a/schemas/proto/foxglove/SceneUpdate.proto b/schemas/proto/foxglove_schemas_protobuf/SceneUpdate.proto similarity index 100% rename from schemas/proto/foxglove/SceneUpdate.proto rename to schemas/proto/foxglove_schemas_protobuf/SceneUpdate.proto diff --git a/schemas/proto/foxglove/SpherePrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/SpherePrimitive.proto similarity index 100% rename from schemas/proto/foxglove/SpherePrimitive.proto rename to schemas/proto/foxglove_schemas_protobuf/SpherePrimitive.proto diff --git a/schemas/proto/foxglove/TextAnnotation.proto b/schemas/proto/foxglove_schemas_protobuf/TextAnnotation.proto similarity index 100% rename from schemas/proto/foxglove/TextAnnotation.proto rename to schemas/proto/foxglove_schemas_protobuf/TextAnnotation.proto diff --git a/schemas/proto/foxglove/TextPrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/TextPrimitive.proto similarity index 100% rename from schemas/proto/foxglove/TextPrimitive.proto rename to schemas/proto/foxglove_schemas_protobuf/TextPrimitive.proto diff --git a/schemas/proto/foxglove/TriangleListPrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/TriangleListPrimitive.proto similarity index 100% rename from schemas/proto/foxglove/TriangleListPrimitive.proto rename to schemas/proto/foxglove_schemas_protobuf/TriangleListPrimitive.proto diff --git a/schemas/proto/foxglove/Vector2.proto b/schemas/proto/foxglove_schemas_protobuf/Vector2.proto similarity index 100% rename from schemas/proto/foxglove/Vector2.proto rename to schemas/proto/foxglove_schemas_protobuf/Vector2.proto diff --git a/schemas/proto/foxglove/Vector3.proto b/schemas/proto/foxglove_schemas_protobuf/Vector3.proto similarity index 100% rename from schemas/proto/foxglove/Vector3.proto rename to schemas/proto/foxglove_schemas_protobuf/Vector3.proto From a6075ebf88b27e88c512bd99aa6f3f696a1b29ff Mon Sep 17 00:00:00 2001 From: Devon Rueckner Date: Fri, 23 Feb 2024 15:42:50 -0500 Subject: [PATCH 2/4] update gen script --- scripts/updateGeneratedFiles.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/updateGeneratedFiles.ts b/scripts/updateGeneratedFiles.ts index 75416347..7941d3fc 100644 --- a/scripts/updateGeneratedFiles.ts +++ b/scripts/updateGeneratedFiles.ts @@ -70,13 +70,13 @@ async function main({ outDir, rosOutDir }: { outDir: string; rosOutDir: string } }); await logProgress("Generating Protobuf definitions", async () => { - await fs.mkdir(path.join(outDir, "proto", "foxglove"), { recursive: true }); + await fs.mkdir(path.join(outDir, "proto", "foxglove_schemas_protobuf"), { recursive: true }); for (const schema of Object.values(foxgloveMessageSchemas)) { const enums = Object.values(foxgloveEnumSchemas).filter( (enumSchema) => enumSchema.parentSchemaName === schema.name, ); await fs.writeFile( - path.join(outDir, "proto", "foxglove", `${schema.name}.proto`), + path.join(outDir, "proto", "foxglove_schemas_protobuf", `${schema.name}.proto`), generateProto(schema, enums), ); } From 83d8b0edf94b7fe1d0021bb7601af8b0f3a84ccd Mon Sep 17 00:00:00 2001 From: Devon Rueckner Date: Fri, 23 Feb 2024 15:51:59 -0500 Subject: [PATCH 3/4] update references --- internal/generateProto.test.ts | 2 +- internal/generateProto.ts | 2 +- .../ArrowPrimitive.proto | 4 ++-- .../CircleAnnotation.proto | 4 ++-- .../CubePrimitive.proto | 6 +++--- .../CylinderPrimitive.proto | 6 +++--- .../FrameTransform.proto | 4 ++-- .../FrameTransforms.proto | 2 +- .../proto/foxglove_schemas_protobuf/Grid.proto | 6 +++--- .../ImageAnnotations.proto | 6 +++--- .../foxglove_schemas_protobuf/LaserScan.proto | 2 +- .../LinePrimitive.proto | 6 +++--- .../ModelPrimitive.proto | 6 +++--- .../foxglove_schemas_protobuf/PointCloud.proto | 4 ++-- .../PointsAnnotation.proto | 4 ++-- .../proto/foxglove_schemas_protobuf/Pose.proto | 4 ++-- .../PoseInFrame.proto | 2 +- .../PosesInFrame.proto | 2 +- .../SceneEntity.proto | 18 +++++++++--------- .../SceneUpdate.proto | 4 ++-- .../SpherePrimitive.proto | 6 +++--- .../TextAnnotation.proto | 4 ++-- .../TextPrimitive.proto | 4 ++-- .../TriangleListPrimitive.proto | 6 +++--- 24 files changed, 57 insertions(+), 57 deletions(-) diff --git a/internal/generateProto.test.ts b/internal/generateProto.test.ts index 63cb2b5f..670a0f72 100644 --- a/internal/generateProto.test.ts +++ b/internal/generateProto.test.ts @@ -11,7 +11,7 @@ describe("generateProto", () => { syntax = "proto3"; - import "foxglove/NestedMessage.proto"; + import "foxglove_schemas_protobuf/NestedMessage.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; diff --git a/internal/generateProto.ts b/internal/generateProto.ts index 5cf66800..797fc5c9 100644 --- a/internal/generateProto.ts +++ b/internal/generateProto.ts @@ -81,7 +81,7 @@ export function generateProto( break; case "nested": qualifiers.push(`foxglove.${field.type.schema.name}`); - imports.add(`foxglove/${field.type.schema.name}`); + imports.add(`foxglove_schemas_protobuf/${field.type.schema.name}`); break; case "primitive": if (field.type.name === "time") { diff --git a/schemas/proto/foxglove_schemas_protobuf/ArrowPrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/ArrowPrimitive.proto index fa724d10..846c9fc0 100644 --- a/schemas/proto/foxglove_schemas_protobuf/ArrowPrimitive.proto +++ b/schemas/proto/foxglove_schemas_protobuf/ArrowPrimitive.proto @@ -2,8 +2,8 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Pose.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/CircleAnnotation.proto b/schemas/proto/foxglove_schemas_protobuf/CircleAnnotation.proto index 89643583..a1f28de9 100644 --- a/schemas/proto/foxglove_schemas_protobuf/CircleAnnotation.proto +++ b/schemas/proto/foxglove_schemas_protobuf/CircleAnnotation.proto @@ -2,8 +2,8 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Point2.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Point2.proto"; import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/CubePrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/CubePrimitive.proto index c4691f1e..f3ae4983 100644 --- a/schemas/proto/foxglove_schemas_protobuf/CubePrimitive.proto +++ b/schemas/proto/foxglove_schemas_protobuf/CubePrimitive.proto @@ -2,9 +2,9 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Pose.proto"; -import "foxglove/Vector3.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; +import "foxglove_schemas_protobuf/Vector3.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/CylinderPrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/CylinderPrimitive.proto index c538ea59..43c7fb1f 100644 --- a/schemas/proto/foxglove_schemas_protobuf/CylinderPrimitive.proto +++ b/schemas/proto/foxglove_schemas_protobuf/CylinderPrimitive.proto @@ -2,9 +2,9 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Pose.proto"; -import "foxglove/Vector3.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; +import "foxglove_schemas_protobuf/Vector3.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/FrameTransform.proto b/schemas/proto/foxglove_schemas_protobuf/FrameTransform.proto index c8e0d58b..85f11c38 100644 --- a/schemas/proto/foxglove_schemas_protobuf/FrameTransform.proto +++ b/schemas/proto/foxglove_schemas_protobuf/FrameTransform.proto @@ -2,8 +2,8 @@ syntax = "proto3"; -import "foxglove/Quaternion.proto"; -import "foxglove/Vector3.proto"; +import "foxglove_schemas_protobuf/Quaternion.proto"; +import "foxglove_schemas_protobuf/Vector3.proto"; import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/FrameTransforms.proto b/schemas/proto/foxglove_schemas_protobuf/FrameTransforms.proto index c1affed5..ebcc5b9a 100644 --- a/schemas/proto/foxglove_schemas_protobuf/FrameTransforms.proto +++ b/schemas/proto/foxglove_schemas_protobuf/FrameTransforms.proto @@ -2,7 +2,7 @@ syntax = "proto3"; -import "foxglove/FrameTransform.proto"; +import "foxglove_schemas_protobuf/FrameTransform.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/Grid.proto b/schemas/proto/foxglove_schemas_protobuf/Grid.proto index abe61785..5396b315 100644 --- a/schemas/proto/foxglove_schemas_protobuf/Grid.proto +++ b/schemas/proto/foxglove_schemas_protobuf/Grid.proto @@ -2,9 +2,9 @@ syntax = "proto3"; -import "foxglove/PackedElementField.proto"; -import "foxglove/Pose.proto"; -import "foxglove/Vector2.proto"; +import "foxglove_schemas_protobuf/PackedElementField.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; +import "foxglove_schemas_protobuf/Vector2.proto"; import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/ImageAnnotations.proto b/schemas/proto/foxglove_schemas_protobuf/ImageAnnotations.proto index 018dd03e..85a7d847 100644 --- a/schemas/proto/foxglove_schemas_protobuf/ImageAnnotations.proto +++ b/schemas/proto/foxglove_schemas_protobuf/ImageAnnotations.proto @@ -2,9 +2,9 @@ syntax = "proto3"; -import "foxglove/CircleAnnotation.proto"; -import "foxglove/PointsAnnotation.proto"; -import "foxglove/TextAnnotation.proto"; +import "foxglove_schemas_protobuf/CircleAnnotation.proto"; +import "foxglove_schemas_protobuf/PointsAnnotation.proto"; +import "foxglove_schemas_protobuf/TextAnnotation.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/LaserScan.proto b/schemas/proto/foxglove_schemas_protobuf/LaserScan.proto index 86933370..442b5452 100644 --- a/schemas/proto/foxglove_schemas_protobuf/LaserScan.proto +++ b/schemas/proto/foxglove_schemas_protobuf/LaserScan.proto @@ -2,7 +2,7 @@ syntax = "proto3"; -import "foxglove/Pose.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/LinePrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/LinePrimitive.proto index 44bd3168..076dedc1 100644 --- a/schemas/proto/foxglove_schemas_protobuf/LinePrimitive.proto +++ b/schemas/proto/foxglove_schemas_protobuf/LinePrimitive.proto @@ -2,9 +2,9 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Point3.proto"; -import "foxglove/Pose.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Point3.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/ModelPrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/ModelPrimitive.proto index 27c47c2d..f20ec5d8 100644 --- a/schemas/proto/foxglove_schemas_protobuf/ModelPrimitive.proto +++ b/schemas/proto/foxglove_schemas_protobuf/ModelPrimitive.proto @@ -2,9 +2,9 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Pose.proto"; -import "foxglove/Vector3.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; +import "foxglove_schemas_protobuf/Vector3.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/PointCloud.proto b/schemas/proto/foxglove_schemas_protobuf/PointCloud.proto index d6724b67..1df3b7f0 100644 --- a/schemas/proto/foxglove_schemas_protobuf/PointCloud.proto +++ b/schemas/proto/foxglove_schemas_protobuf/PointCloud.proto @@ -2,8 +2,8 @@ syntax = "proto3"; -import "foxglove/PackedElementField.proto"; -import "foxglove/Pose.proto"; +import "foxglove_schemas_protobuf/PackedElementField.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/PointsAnnotation.proto b/schemas/proto/foxglove_schemas_protobuf/PointsAnnotation.proto index c4436994..0cd49151 100644 --- a/schemas/proto/foxglove_schemas_protobuf/PointsAnnotation.proto +++ b/schemas/proto/foxglove_schemas_protobuf/PointsAnnotation.proto @@ -2,8 +2,8 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Point2.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Point2.proto"; import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/Pose.proto b/schemas/proto/foxglove_schemas_protobuf/Pose.proto index 5c93902c..628a1f20 100644 --- a/schemas/proto/foxglove_schemas_protobuf/Pose.proto +++ b/schemas/proto/foxglove_schemas_protobuf/Pose.proto @@ -2,8 +2,8 @@ syntax = "proto3"; -import "foxglove/Quaternion.proto"; -import "foxglove/Vector3.proto"; +import "foxglove_schemas_protobuf/Quaternion.proto"; +import "foxglove_schemas_protobuf/Vector3.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/PoseInFrame.proto b/schemas/proto/foxglove_schemas_protobuf/PoseInFrame.proto index 61046915..8e2688b4 100644 --- a/schemas/proto/foxglove_schemas_protobuf/PoseInFrame.proto +++ b/schemas/proto/foxglove_schemas_protobuf/PoseInFrame.proto @@ -2,7 +2,7 @@ syntax = "proto3"; -import "foxglove/Pose.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/PosesInFrame.proto b/schemas/proto/foxglove_schemas_protobuf/PosesInFrame.proto index ca1c920a..afd70541 100644 --- a/schemas/proto/foxglove_schemas_protobuf/PosesInFrame.proto +++ b/schemas/proto/foxglove_schemas_protobuf/PosesInFrame.proto @@ -2,7 +2,7 @@ syntax = "proto3"; -import "foxglove/Pose.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/SceneEntity.proto b/schemas/proto/foxglove_schemas_protobuf/SceneEntity.proto index 73bca2dd..ba397d6e 100644 --- a/schemas/proto/foxglove_schemas_protobuf/SceneEntity.proto +++ b/schemas/proto/foxglove_schemas_protobuf/SceneEntity.proto @@ -2,15 +2,15 @@ syntax = "proto3"; -import "foxglove/ArrowPrimitive.proto"; -import "foxglove/CubePrimitive.proto"; -import "foxglove/CylinderPrimitive.proto"; -import "foxglove/KeyValuePair.proto"; -import "foxglove/LinePrimitive.proto"; -import "foxglove/ModelPrimitive.proto"; -import "foxglove/SpherePrimitive.proto"; -import "foxglove/TextPrimitive.proto"; -import "foxglove/TriangleListPrimitive.proto"; +import "foxglove_schemas_protobuf/ArrowPrimitive.proto"; +import "foxglove_schemas_protobuf/CubePrimitive.proto"; +import "foxglove_schemas_protobuf/CylinderPrimitive.proto"; +import "foxglove_schemas_protobuf/KeyValuePair.proto"; +import "foxglove_schemas_protobuf/LinePrimitive.proto"; +import "foxglove_schemas_protobuf/ModelPrimitive.proto"; +import "foxglove_schemas_protobuf/SpherePrimitive.proto"; +import "foxglove_schemas_protobuf/TextPrimitive.proto"; +import "foxglove_schemas_protobuf/TriangleListPrimitive.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; diff --git a/schemas/proto/foxglove_schemas_protobuf/SceneUpdate.proto b/schemas/proto/foxglove_schemas_protobuf/SceneUpdate.proto index e2bb8764..ee5c46d5 100644 --- a/schemas/proto/foxglove_schemas_protobuf/SceneUpdate.proto +++ b/schemas/proto/foxglove_schemas_protobuf/SceneUpdate.proto @@ -2,8 +2,8 @@ syntax = "proto3"; -import "foxglove/SceneEntity.proto"; -import "foxglove/SceneEntityDeletion.proto"; +import "foxglove_schemas_protobuf/SceneEntity.proto"; +import "foxglove_schemas_protobuf/SceneEntityDeletion.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/SpherePrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/SpherePrimitive.proto index de2aebd7..70e00fa0 100644 --- a/schemas/proto/foxglove_schemas_protobuf/SpherePrimitive.proto +++ b/schemas/proto/foxglove_schemas_protobuf/SpherePrimitive.proto @@ -2,9 +2,9 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Pose.proto"; -import "foxglove/Vector3.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; +import "foxglove_schemas_protobuf/Vector3.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/TextAnnotation.proto b/schemas/proto/foxglove_schemas_protobuf/TextAnnotation.proto index 1fee439f..6bc6b16e 100644 --- a/schemas/proto/foxglove_schemas_protobuf/TextAnnotation.proto +++ b/schemas/proto/foxglove_schemas_protobuf/TextAnnotation.proto @@ -2,8 +2,8 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Point2.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Point2.proto"; import "google/protobuf/timestamp.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/TextPrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/TextPrimitive.proto index a7ea7569..6307b7f9 100644 --- a/schemas/proto/foxglove_schemas_protobuf/TextPrimitive.proto +++ b/schemas/proto/foxglove_schemas_protobuf/TextPrimitive.proto @@ -2,8 +2,8 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Pose.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; package foxglove; diff --git a/schemas/proto/foxglove_schemas_protobuf/TriangleListPrimitive.proto b/schemas/proto/foxglove_schemas_protobuf/TriangleListPrimitive.proto index 090e3956..598f6003 100644 --- a/schemas/proto/foxglove_schemas_protobuf/TriangleListPrimitive.proto +++ b/schemas/proto/foxglove_schemas_protobuf/TriangleListPrimitive.proto @@ -2,9 +2,9 @@ syntax = "proto3"; -import "foxglove/Color.proto"; -import "foxglove/Point3.proto"; -import "foxglove/Pose.proto"; +import "foxglove_schemas_protobuf/Color.proto"; +import "foxglove_schemas_protobuf/Point3.proto"; +import "foxglove_schemas_protobuf/Pose.proto"; package foxglove; From 93c0f983ab50327aecb076c3f12b6e4b3eab294c Mon Sep 17 00:00:00 2001 From: Devon Rueckner Date: Fri, 23 Feb 2024 15:52:10 -0500 Subject: [PATCH 4/4] rework makefile --- python/Makefile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/python/Makefile b/python/Makefile index 4d594e9c..d58e8790 100644 --- a/python/Makefile +++ b/python/Makefile @@ -29,15 +29,10 @@ generate-flatbuffer: generate-protobuf: rm -rf foxglove-schemas-protobuf/foxglove_schemas_protobuf/*_pb2* pipenv run protoc \ - --python_out=foxglove-schemas-protobuf/foxglove_schemas_protobuf \ - --mypy_out=foxglove-schemas-protobuf/foxglove_schemas_protobuf \ + --python_out=foxglove-schemas-protobuf \ + --mypy_out=foxglove-schemas-protobuf \ --proto_path ../schemas/proto \ - ../schemas/proto/foxglove/*.proto - mv foxglove-schemas-protobuf/foxglove_schemas_protobuf/foxglove/* foxglove-schemas-protobuf/foxglove_schemas_protobuf - rmdir foxglove-schemas-protobuf/foxglove_schemas_protobuf/foxglove - sed -E $(SED_ARGS) 's/from foxglove import/from . import/g' foxglove-schemas-protobuf/foxglove_schemas_protobuf/*_pb2.py - sed -E $(SED_ARGS) 's/import foxglove\.(.+)$$/from . import \1 as foxglove_\1/g' foxglove-schemas-protobuf/foxglove_schemas_protobuf/*_pb2.pyi - sed -E $(SED_ARGS) 's/foxglove\./foxglove_/g' foxglove-schemas-protobuf/foxglove_schemas_protobuf/*_pb2.pyi + ../schemas/proto/foxglove_schemas_protobuf/*.proto .PHONY: build build: pipenv generate-flatbuffer generate-protobuf