@foxglove/schemas 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/dist/cjs/schemas/typescript/ArrowPrimitive.d.ts +18 -0
  3. package/dist/cjs/schemas/typescript/ArrowPrimitive.d.ts.map +1 -0
  4. package/dist/cjs/schemas/typescript/ArrowPrimitive.js +4 -0
  5. package/dist/cjs/schemas/typescript/ArrowPrimitive.js.map +1 -0
  6. package/dist/cjs/schemas/typescript/CubePrimitive.d.ts +13 -0
  7. package/dist/cjs/schemas/typescript/CubePrimitive.d.ts.map +1 -0
  8. package/dist/cjs/schemas/typescript/CubePrimitive.js +4 -0
  9. package/dist/cjs/schemas/typescript/CubePrimitive.js.map +1 -0
  10. package/dist/cjs/schemas/typescript/CylinderPrimitive.d.ts +17 -0
  11. package/dist/cjs/schemas/typescript/CylinderPrimitive.d.ts.map +1 -0
  12. package/dist/cjs/schemas/typescript/CylinderPrimitive.js +4 -0
  13. package/dist/cjs/schemas/typescript/CylinderPrimitive.js.map +1 -0
  14. package/dist/cjs/schemas/typescript/KeyValuePair.d.ts +8 -0
  15. package/dist/cjs/schemas/typescript/KeyValuePair.d.ts.map +1 -0
  16. package/dist/cjs/schemas/typescript/KeyValuePair.js +4 -0
  17. package/dist/cjs/schemas/typescript/KeyValuePair.js.map +1 -0
  18. package/dist/cjs/schemas/typescript/LinePrimitive.d.ts +28 -0
  19. package/dist/cjs/schemas/typescript/LinePrimitive.d.ts.map +1 -0
  20. package/dist/cjs/schemas/typescript/LinePrimitive.js +4 -0
  21. package/dist/cjs/schemas/typescript/LinePrimitive.js.map +1 -0
  22. package/dist/cjs/schemas/typescript/LineType.d.ts +10 -0
  23. package/dist/cjs/schemas/typescript/LineType.d.ts.map +1 -0
  24. package/dist/cjs/schemas/typescript/LineType.js +15 -0
  25. package/dist/cjs/schemas/typescript/LineType.js.map +1 -0
  26. package/dist/cjs/schemas/typescript/ModelPrimitive.d.ts +21 -0
  27. package/dist/cjs/schemas/typescript/ModelPrimitive.d.ts.map +1 -0
  28. package/dist/cjs/schemas/typescript/ModelPrimitive.js +4 -0
  29. package/dist/cjs/schemas/typescript/ModelPrimitive.js.map +1 -0
  30. package/dist/cjs/schemas/typescript/SceneEntity.d.ts +43 -0
  31. package/dist/cjs/schemas/typescript/SceneEntity.d.ts.map +1 -0
  32. package/dist/cjs/schemas/typescript/SceneEntity.js +4 -0
  33. package/dist/cjs/schemas/typescript/SceneEntity.js.map +1 -0
  34. package/dist/cjs/schemas/typescript/SceneEntityDeletion.d.ts +12 -0
  35. package/dist/cjs/schemas/typescript/SceneEntityDeletion.d.ts.map +1 -0
  36. package/dist/cjs/schemas/typescript/SceneEntityDeletion.js +4 -0
  37. package/dist/cjs/schemas/typescript/SceneEntityDeletion.js.map +1 -0
  38. package/dist/cjs/schemas/typescript/SceneEntityDeletionType.d.ts +8 -0
  39. package/dist/cjs/schemas/typescript/SceneEntityDeletionType.d.ts.map +1 -0
  40. package/dist/cjs/schemas/typescript/SceneEntityDeletionType.js +13 -0
  41. package/dist/cjs/schemas/typescript/SceneEntityDeletionType.js.map +1 -0
  42. package/dist/cjs/schemas/typescript/SceneUpdate.d.ts +10 -0
  43. package/dist/cjs/schemas/typescript/SceneUpdate.d.ts.map +1 -0
  44. package/dist/cjs/schemas/typescript/SceneUpdate.js +4 -0
  45. package/dist/cjs/schemas/typescript/SceneUpdate.js.map +1 -0
  46. package/dist/cjs/schemas/typescript/SpherePrimitive.d.ts +13 -0
  47. package/dist/cjs/schemas/typescript/SpherePrimitive.d.ts.map +1 -0
  48. package/dist/cjs/schemas/typescript/SpherePrimitive.js +4 -0
  49. package/dist/cjs/schemas/typescript/SpherePrimitive.js.map +1 -0
  50. package/dist/cjs/schemas/typescript/TextPrimitive.d.ts +18 -0
  51. package/dist/cjs/schemas/typescript/TextPrimitive.d.ts.map +1 -0
  52. package/dist/cjs/schemas/typescript/TextPrimitive.js +4 -0
  53. package/dist/cjs/schemas/typescript/TextPrimitive.js.map +1 -0
  54. package/dist/cjs/schemas/typescript/TriangleListPrimitive.d.ts +21 -0
  55. package/dist/cjs/schemas/typescript/TriangleListPrimitive.d.ts.map +1 -0
  56. package/dist/cjs/schemas/typescript/TriangleListPrimitive.js +4 -0
  57. package/dist/cjs/schemas/typescript/TriangleListPrimitive.js.map +1 -0
  58. package/dist/cjs/schemas/typescript/index.d.ts +14 -0
  59. package/dist/cjs/schemas/typescript/index.d.ts.map +1 -1
  60. package/dist/cjs/schemas/typescript/index.js +14 -0
  61. package/dist/cjs/schemas/typescript/index.js.map +1 -1
  62. package/dist/cjs/src/schemas.d.ts +15 -1
  63. package/dist/cjs/src/schemas.d.ts.map +1 -1
  64. package/dist/cjs/src/schemas.js +541 -79
  65. package/dist/cjs/src/schemas.js.map +1 -1
  66. package/dist/cjs/src/schemas.test.js +17 -0
  67. package/dist/cjs/src/schemas.test.js.map +1 -1
  68. package/dist/esm/schemas/typescript/ArrowPrimitive.d.ts +18 -0
  69. package/dist/esm/schemas/typescript/ArrowPrimitive.d.ts.map +1 -0
  70. package/dist/esm/schemas/typescript/ArrowPrimitive.js +3 -0
  71. package/dist/esm/schemas/typescript/ArrowPrimitive.js.map +1 -0
  72. package/dist/esm/schemas/typescript/CubePrimitive.d.ts +13 -0
  73. package/dist/esm/schemas/typescript/CubePrimitive.d.ts.map +1 -0
  74. package/dist/esm/schemas/typescript/CubePrimitive.js +3 -0
  75. package/dist/esm/schemas/typescript/CubePrimitive.js.map +1 -0
  76. package/dist/esm/schemas/typescript/CylinderPrimitive.d.ts +17 -0
  77. package/dist/esm/schemas/typescript/CylinderPrimitive.d.ts.map +1 -0
  78. package/dist/esm/schemas/typescript/CylinderPrimitive.js +3 -0
  79. package/dist/esm/schemas/typescript/CylinderPrimitive.js.map +1 -0
  80. package/dist/esm/schemas/typescript/KeyValuePair.d.ts +8 -0
  81. package/dist/esm/schemas/typescript/KeyValuePair.d.ts.map +1 -0
  82. package/dist/esm/schemas/typescript/KeyValuePair.js +3 -0
  83. package/dist/esm/schemas/typescript/KeyValuePair.js.map +1 -0
  84. package/dist/esm/schemas/typescript/LinePrimitive.d.ts +28 -0
  85. package/dist/esm/schemas/typescript/LinePrimitive.d.ts.map +1 -0
  86. package/dist/esm/schemas/typescript/LinePrimitive.js +3 -0
  87. package/dist/esm/schemas/typescript/LinePrimitive.js.map +1 -0
  88. package/dist/esm/schemas/typescript/LineType.d.ts +10 -0
  89. package/dist/esm/schemas/typescript/LineType.d.ts.map +1 -0
  90. package/dist/esm/schemas/typescript/LineType.js +12 -0
  91. package/dist/esm/schemas/typescript/LineType.js.map +1 -0
  92. package/dist/esm/schemas/typescript/ModelPrimitive.d.ts +21 -0
  93. package/dist/esm/schemas/typescript/ModelPrimitive.d.ts.map +1 -0
  94. package/dist/esm/schemas/typescript/ModelPrimitive.js +3 -0
  95. package/dist/esm/schemas/typescript/ModelPrimitive.js.map +1 -0
  96. package/dist/esm/schemas/typescript/SceneEntity.d.ts +43 -0
  97. package/dist/esm/schemas/typescript/SceneEntity.d.ts.map +1 -0
  98. package/dist/esm/schemas/typescript/SceneEntity.js +3 -0
  99. package/dist/esm/schemas/typescript/SceneEntity.js.map +1 -0
  100. package/dist/esm/schemas/typescript/SceneEntityDeletion.d.ts +12 -0
  101. package/dist/esm/schemas/typescript/SceneEntityDeletion.d.ts.map +1 -0
  102. package/dist/esm/schemas/typescript/SceneEntityDeletion.js +3 -0
  103. package/dist/esm/schemas/typescript/SceneEntityDeletion.js.map +1 -0
  104. package/dist/esm/schemas/typescript/SceneEntityDeletionType.d.ts +8 -0
  105. package/dist/esm/schemas/typescript/SceneEntityDeletionType.d.ts.map +1 -0
  106. package/dist/esm/schemas/typescript/SceneEntityDeletionType.js +10 -0
  107. package/dist/esm/schemas/typescript/SceneEntityDeletionType.js.map +1 -0
  108. package/dist/esm/schemas/typescript/SceneUpdate.d.ts +10 -0
  109. package/dist/esm/schemas/typescript/SceneUpdate.d.ts.map +1 -0
  110. package/dist/esm/schemas/typescript/SceneUpdate.js +3 -0
  111. package/dist/esm/schemas/typescript/SceneUpdate.js.map +1 -0
  112. package/dist/esm/schemas/typescript/SpherePrimitive.d.ts +13 -0
  113. package/dist/esm/schemas/typescript/SpherePrimitive.d.ts.map +1 -0
  114. package/dist/esm/schemas/typescript/SpherePrimitive.js +3 -0
  115. package/dist/esm/schemas/typescript/SpherePrimitive.js.map +1 -0
  116. package/dist/esm/schemas/typescript/TextPrimitive.d.ts +18 -0
  117. package/dist/esm/schemas/typescript/TextPrimitive.d.ts.map +1 -0
  118. package/dist/esm/schemas/typescript/TextPrimitive.js +3 -0
  119. package/dist/esm/schemas/typescript/TextPrimitive.js.map +1 -0
  120. package/dist/esm/schemas/typescript/TriangleListPrimitive.d.ts +21 -0
  121. package/dist/esm/schemas/typescript/TriangleListPrimitive.d.ts.map +1 -0
  122. package/dist/esm/schemas/typescript/TriangleListPrimitive.js +3 -0
  123. package/dist/esm/schemas/typescript/TriangleListPrimitive.js.map +1 -0
  124. package/dist/esm/schemas/typescript/index.d.ts +14 -0
  125. package/dist/esm/schemas/typescript/index.d.ts.map +1 -1
  126. package/dist/esm/schemas/typescript/index.js +14 -0
  127. package/dist/esm/schemas/typescript/index.js.map +1 -1
  128. package/dist/esm/src/schemas.d.ts +15 -1
  129. package/dist/esm/src/schemas.d.ts.map +1 -1
  130. package/dist/esm/src/schemas.js +541 -79
  131. package/dist/esm/src/schemas.js.map +1 -1
  132. package/dist/esm/src/schemas.test.js +17 -0
  133. package/dist/esm/src/schemas.test.js.map +1 -1
  134. package/package.json +1 -1
  135. package/schemas/README.md +1034 -17
  136. package/schemas/jsonschema/ArrowPrimitive.json +96 -0
  137. package/schemas/jsonschema/CubePrimitive.json +99 -0
  138. package/schemas/jsonschema/CylinderPrimitive.json +107 -0
  139. package/schemas/jsonschema/KeyValuePair.json +16 -0
  140. package/schemas/jsonschema/LinePrimitive.json +167 -0
  141. package/schemas/jsonschema/ModelPrimitive.json +116 -0
  142. package/schemas/jsonschema/SceneEntity.json +1012 -0
  143. package/schemas/jsonschema/SceneEntityDeletion.json +44 -0
  144. package/schemas/jsonschema/SceneUpdate.json +1070 -0
  145. package/schemas/jsonschema/SpherePrimitive.json +99 -0
  146. package/schemas/jsonschema/TextPrimitive.json +96 -0
  147. package/schemas/jsonschema/TriangleListPrimitive.json +138 -0
  148. package/schemas/proto/foxglove/ArrowPrimitive.proto +29 -0
  149. package/schemas/proto/foxglove/CubePrimitive.proto +21 -0
  150. package/schemas/proto/foxglove/CylinderPrimitive.proto +27 -0
  151. package/schemas/proto/foxglove/KeyValuePair.proto +14 -0
  152. package/schemas/proto/foxglove/LinePrimitive.proto +49 -0
  153. package/schemas/proto/foxglove/ModelPrimitive.proto +33 -0
  154. package/schemas/proto/foxglove/SceneEntity.proto +62 -0
  155. package/schemas/proto/foxglove/SceneEntityDeletion.proto +27 -0
  156. package/schemas/proto/foxglove/SceneUpdate.proto +17 -0
  157. package/schemas/proto/foxglove/SpherePrimitive.proto +21 -0
  158. package/schemas/proto/foxglove/TextPrimitive.proto +29 -0
  159. package/schemas/proto/foxglove/TriangleListPrimitive.proto +29 -0
  160. package/schemas/ros1/ArrowPrimitive.msg +22 -0
  161. package/schemas/ros1/CubePrimitive.msg +13 -0
  162. package/schemas/ros1/CylinderPrimitive.msg +19 -0
  163. package/schemas/ros1/KeyValuePair.msg +10 -0
  164. package/schemas/ros1/LinePrimitive.msg +39 -0
  165. package/schemas/ros1/ModelPrimitive.msg +25 -0
  166. package/schemas/ros1/SceneEntity.msg +46 -0
  167. package/schemas/ros1/SceneEntityDeletion.msg +19 -0
  168. package/schemas/ros1/SceneUpdate.msg +10 -0
  169. package/schemas/ros1/SpherePrimitive.msg +13 -0
  170. package/schemas/ros1/TextPrimitive.msg +22 -0
  171. package/schemas/ros1/TriangleListPrimitive.msg +21 -0
  172. package/schemas/ros2/ArrowPrimitive.msg +22 -0
  173. package/schemas/ros2/CubePrimitive.msg +13 -0
  174. package/schemas/ros2/CylinderPrimitive.msg +19 -0
  175. package/schemas/ros2/KeyValuePair.msg +10 -0
  176. package/schemas/ros2/LinePrimitive.msg +39 -0
  177. package/schemas/ros2/ModelPrimitive.msg +25 -0
  178. package/schemas/ros2/SceneEntity.msg +46 -0
  179. package/schemas/ros2/SceneEntityDeletion.msg +19 -0
  180. package/schemas/ros2/SceneUpdate.msg +10 -0
  181. package/schemas/ros2/SpherePrimitive.msg +13 -0
  182. package/schemas/ros2/TextPrimitive.msg +22 -0
  183. package/schemas/ros2/TriangleListPrimitive.msg +21 -0
  184. package/schemas/typescript/ArrowPrimitive.ts +25 -0
  185. package/schemas/typescript/CubePrimitive.ts +17 -0
  186. package/schemas/typescript/CylinderPrimitive.ts +23 -0
  187. package/schemas/typescript/KeyValuePair.ts +10 -0
  188. package/schemas/typescript/LinePrimitive.ts +37 -0
  189. package/schemas/typescript/LineType.ts +13 -0
  190. package/schemas/typescript/ModelPrimitive.ts +29 -0
  191. package/schemas/typescript/SceneEntity.ts +58 -0
  192. package/schemas/typescript/SceneEntityDeletion.ts +16 -0
  193. package/schemas/typescript/SceneEntityDeletionType.ts +10 -0
  194. package/schemas/typescript/SceneUpdate.ts +13 -0
  195. package/schemas/typescript/SpherePrimitive.ts +17 -0
  196. package/schemas/typescript/TextPrimitive.ts +25 -0
  197. package/schemas/typescript/TriangleListPrimitive.ts +27 -0
  198. package/schemas/typescript/index.ts +14 -0
  199. package/src/schemas.test.ts +19 -0
  200. package/src/schemas.ts +587 -79
@@ -0,0 +1,37 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ import { Color } from "./Color";
4
+ import { LineType } from "./LineType";
5
+ import { Point3 } from "./Point3";
6
+ import { Pose } from "./Pose";
7
+
8
+ /** (Experimental, subject to change) A primitive representing a series of points connected by lines */
9
+ export type LinePrimitive = {
10
+ /** Drawing primitive to use for lines */
11
+ type: LineType;
12
+
13
+ /** Origin of lines relative to reference frame */
14
+ pose: Pose;
15
+
16
+ /** Line thickness */
17
+ thickness: number;
18
+
19
+ /** Indicates whether `thickness` is a fixed size in screen pixels (true), or specified in world coordinates and scales with distance from the camera (false) */
20
+ scale_invariant: boolean;
21
+
22
+ /** Points along the line */
23
+ points: Point3[];
24
+
25
+ /** Solid color to use for the whole line. One of `color` or `colors` must be provided. */
26
+ color: Color;
27
+
28
+ /** Per-point colors (if specified, must have the same length as `points`). One of `color` or `colors` must be provided. */
29
+ colors: Color[];
30
+
31
+ /**
32
+ * Indices into the `points` and `colors` attribute arrays, which can be used to avoid duplicating attribute data.
33
+ *
34
+ * 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).
35
+ */
36
+ indices: number[];
37
+ };
@@ -0,0 +1,13 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ /** (Experimental, subject to change) An enumeration indicating how input points should be interpreted to create lines */
4
+ export enum LineType {
5
+ /** 0-1, 1-2, ..., (n-1)-n */
6
+ LINE_STRIP = 0,
7
+
8
+ /** 0-1, 1-2, ..., (n-1)-n, n-0 */
9
+ LINE_LOOP = 1,
10
+
11
+ /** 0-1, 2-3, 4-5, ... */
12
+ LINE_LIST = 2,
13
+ }
@@ -0,0 +1,29 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ import { Color } from "./Color";
4
+ import { Pose } from "./Pose";
5
+ import { Vector3 } from "./Vector3";
6
+
7
+ /** (Experimental, subject to change) A primitive representing a 3D model file loaded from an external URL or embedded data */
8
+ export type ModelPrimitive = {
9
+ /** Origin of model relative to reference frame */
10
+ pose: Pose;
11
+
12
+ /** Scale factor to apply to the model along each axis */
13
+ scale: Vector3;
14
+
15
+ /** Solid color to use for the whole model if `override_color` is true. */
16
+ color: Color;
17
+
18
+ /** Whether to use the color specified in `color` instead of any materials embedded in the original model. */
19
+ override_color: boolean;
20
+
21
+ /** URL pointing to model file. One of `url` or `data` should be provided. */
22
+ url: string;
23
+
24
+ /** [Media type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of embedded model (e.g. `model/gltf-binary`). Required if `data` is provided instead of `url`. Overrides the inferred media type if `url` is provided. */
25
+ media_type: string;
26
+
27
+ /** Embedded model. One of `url` or `data` should be provided. If `data` is provided, `media_type` must be set to indicate the type of the data. */
28
+ data: Uint8Array;
29
+ };
@@ -0,0 +1,58 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ import { ArrowPrimitive } from "./ArrowPrimitive";
4
+ import { CubePrimitive } from "./CubePrimitive";
5
+ import { CylinderPrimitive } from "./CylinderPrimitive";
6
+ import { Duration } from "./Duration";
7
+ import { KeyValuePair } from "./KeyValuePair";
8
+ import { LinePrimitive } from "./LinePrimitive";
9
+ import { ModelPrimitive } from "./ModelPrimitive";
10
+ import { SpherePrimitive } from "./SpherePrimitive";
11
+ import { TextPrimitive } from "./TextPrimitive";
12
+ import { Time } from "./Time";
13
+ import { TriangleListPrimitive } from "./TriangleListPrimitive";
14
+
15
+ /** (Experimental, subject to change) A visual element in a 3D scene. An entity may be composed of multiple primitives which all share the same frame of reference. */
16
+ export type SceneEntity = {
17
+ /** Timestamp of the entity */
18
+ timestamp: Time;
19
+
20
+ /** Frame of reference */
21
+ frame_id: string;
22
+
23
+ /** Identifier for the entity. A entity will replace any prior entity on the same topic with the same `id`. */
24
+ id: string;
25
+
26
+ /** Length of time (relative to `timestamp`) after which the entity should be automatically removed. Zero value indicates the entity should remain visible until it is replaced or deleted. */
27
+ lifetime: Duration;
28
+
29
+ /** Whether the entity should keep its location in the fixed frame (false) or follow the frame specified in `frame_id` as it moves relative to the fixed frame (true) */
30
+ frame_locked: boolean;
31
+
32
+ /** Additional user-provided metadata associated with the entity. Keys must be unique. */
33
+ metadata: KeyValuePair[];
34
+
35
+ /** Arrow primitives */
36
+ arrows: ArrowPrimitive[];
37
+
38
+ /** Cube primitives */
39
+ cubes: CubePrimitive[];
40
+
41
+ /** Sphere primitives */
42
+ spheres: SpherePrimitive[];
43
+
44
+ /** Cylinder primitives */
45
+ cylinders: CylinderPrimitive[];
46
+
47
+ /** Line primitives */
48
+ lines: LinePrimitive[];
49
+
50
+ /** Triangle list primitives */
51
+ triangles: TriangleListPrimitive[];
52
+
53
+ /** Text primitives */
54
+ texts: TextPrimitive[];
55
+
56
+ /** Model primitives */
57
+ models: ModelPrimitive[];
58
+ };
@@ -0,0 +1,16 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ import { SceneEntityDeletionType } from "./SceneEntityDeletionType";
4
+ import { Time } from "./Time";
5
+
6
+ /** (Experimental, subject to change) Command to remove previously published entities */
7
+ export type SceneEntityDeletion = {
8
+ /** Timestamp of the deletion. Only matching entities earlier than this timestamp will be deleted. */
9
+ timestamp: Time;
10
+
11
+ /** Type of deletion action to perform */
12
+ type: SceneEntityDeletionType;
13
+
14
+ /** Identifier which must match if `type` is `MATCHING_ID`. */
15
+ id: string;
16
+ };
@@ -0,0 +1,10 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ /** (Experimental, subject to change) An enumeration indicating which entities should match a SceneEntityDeletion command */
4
+ export enum SceneEntityDeletionType {
5
+ /** Delete the existing entity on the same topic that has the provided `id` */
6
+ MATCHING_ID = 0,
7
+
8
+ /** Delete all existing entities on the same topic */
9
+ ALL = 1,
10
+ }
@@ -0,0 +1,13 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ import { SceneEntity } from "./SceneEntity";
4
+ import { SceneEntityDeletion } from "./SceneEntityDeletion";
5
+
6
+ /** (Experimental, subject to change) An update to the entities displayed in a 3D scene */
7
+ export type SceneUpdate = {
8
+ /** Scene entities to delete */
9
+ deletions: SceneEntityDeletion[];
10
+
11
+ /** Scene entities to add or replace */
12
+ entities: SceneEntity[];
13
+ };
@@ -0,0 +1,17 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ import { Color } from "./Color";
4
+ import { Pose } from "./Pose";
5
+ import { Vector3 } from "./Vector3";
6
+
7
+ /** (Experimental, subject to change) A primitive representing a sphere or ellipsoid */
8
+ export type SpherePrimitive = {
9
+ /** Position of the center of the sphere and orientation of the sphere */
10
+ pose: Pose;
11
+
12
+ /** Size (diameter) of the sphere along each axis */
13
+ size: Vector3;
14
+
15
+ /** Color of the sphere */
16
+ color: Color;
17
+ };
@@ -0,0 +1,25 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ import { Color } from "./Color";
4
+ import { Pose } from "./Pose";
5
+
6
+ /** (Experimental, subject to change) A primitive representing a text label */
7
+ export type TextPrimitive = {
8
+ /** Position of the center of the text box and orientation of the text. Identity orientation means the text is oriented in the xy-plane and flows from -x to +x. */
9
+ pose: Pose;
10
+
11
+ /** Whether the text should respect `pose.orientation` (false) or always face the camera (true) */
12
+ billboard: boolean;
13
+
14
+ /** Font size (height of one line of text) */
15
+ font_size: number;
16
+
17
+ /** Indicates whether `font_size` is a fixed size in screen pixels (true), or specified in world coordinates and scales with distance from the camera (false) */
18
+ scale_invariant: boolean;
19
+
20
+ /** Color of the text */
21
+ color: Color;
22
+
23
+ /** Text */
24
+ text: string;
25
+ };
@@ -0,0 +1,27 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ import { Color } from "./Color";
4
+ import { Point3 } from "./Point3";
5
+ import { Pose } from "./Pose";
6
+
7
+ /** (Experimental, subject to change) A primitive representing a set of triangles or a surface tiled by triangles */
8
+ export type TriangleListPrimitive = {
9
+ /** Origin of triangles relative to reference frame */
10
+ pose: Pose;
11
+
12
+ /** Vertices to use for triangles, interpreted as a list of triples (0-1-2, 3-4-5, ...) */
13
+ points: Point3[];
14
+
15
+ /** Solid color to use for the whole shape. One of `color` or `colors` must be provided. */
16
+ color: Color;
17
+
18
+ /** Per-vertex colors (if specified, must have the same length as `points`). One of `color` or `colors` must be provided. */
19
+ colors: Color[];
20
+
21
+ /**
22
+ * Indices into the `points` and `colors` attribute arrays, which can be used to avoid duplicating attribute data.
23
+ *
24
+ * 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).
25
+ */
26
+ indices: number[];
27
+ };
@@ -1,15 +1,22 @@
1
+ export * from "./ArrowPrimitive";
1
2
  export * from "./CameraCalibration";
2
3
  export * from "./CircleAnnotation";
3
4
  export * from "./Color";
4
5
  export * from "./CompressedImage";
6
+ export * from "./CubePrimitive";
7
+ export * from "./CylinderPrimitive";
5
8
  export * from "./FrameTransform";
6
9
  export * from "./GeoJSON";
7
10
  export * from "./Grid";
8
11
  export * from "./ImageAnnotations";
12
+ export * from "./KeyValuePair";
9
13
  export * from "./LaserScan";
14
+ export * from "./LinePrimitive";
15
+ export * from "./LineType";
10
16
  export * from "./LocationFix";
11
17
  export * from "./Log";
12
18
  export * from "./LogLevel";
19
+ export * from "./ModelPrimitive";
13
20
  export * from "./NumericType";
14
21
  export * from "./PackedElementField";
15
22
  export * from "./Point2";
@@ -23,5 +30,12 @@ export * from "./PosesInFrame";
23
30
  export * from "./PositionCovarianceType";
24
31
  export * from "./Quaternion";
25
32
  export * from "./RawImage";
33
+ export * from "./SceneEntity";
34
+ export * from "./SceneEntityDeletion";
35
+ export * from "./SceneEntityDeletionType";
36
+ export * from "./SceneUpdate";
37
+ export * from "./SpherePrimitive";
38
+ export * from "./TextPrimitive";
39
+ export * from "./TriangleListPrimitive";
26
40
  export * from "./Vector2";
27
41
  export * from "./Vector3";
@@ -1,4 +1,5 @@
1
1
  import { foxgloveEnumSchemas, foxgloveMessageSchemas } from "./schemas";
2
+ import { FoxgloveMessageSchema } from "./types";
2
3
 
3
4
  describe("schemas", () => {
4
5
  it("has matching names", () => {
@@ -11,6 +12,24 @@ describe("schemas", () => {
11
12
  }
12
13
  });
13
14
 
15
+ const allSchemas = new Set<FoxgloveMessageSchema>();
16
+ function addNestedSchemas(schema: FoxgloveMessageSchema, schemas: Set<FoxgloveMessageSchema>) {
17
+ if (schemas.has(schema)) {
18
+ return;
19
+ }
20
+ schemas.add(schema);
21
+ for (const field of schema.fields) {
22
+ if (field.type.type === "nested") {
23
+ addNestedSchemas(field.type.schema, schemas);
24
+ }
25
+ }
26
+ }
27
+ const exportedSchemas = Object.values(foxgloveMessageSchemas);
28
+ exportedSchemas.forEach((schema) => addNestedSchemas(schema, allSchemas));
29
+ it.each([...allSchemas])("exports nested schemas - $name", (nestedSchema) => {
30
+ expect(exportedSchemas).toContain(nestedSchema);
31
+ });
32
+
14
33
  it("has valid descriptions", () => {
15
34
  for (const schema of Object.values(foxgloveMessageSchemas)) {
16
35
  // Multi-line descriptions are supported for fields, but not currently for schemas