@foxglove/schemas 0.3.0 → 0.6.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 (267) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/README.md +5 -7
  3. package/dist/cjs/schemas/typescript/ArrowPrimitive.d.ts +18 -0
  4. package/dist/cjs/schemas/typescript/ArrowPrimitive.d.ts.map +1 -0
  5. package/dist/cjs/schemas/typescript/ArrowPrimitive.js +4 -0
  6. package/dist/cjs/schemas/typescript/ArrowPrimitive.js.map +1 -0
  7. package/dist/cjs/schemas/typescript/CameraCalibration.d.ts +2 -0
  8. package/dist/cjs/schemas/typescript/CameraCalibration.d.ts.map +1 -1
  9. package/dist/cjs/schemas/typescript/CompressedImage.d.ts +2 -0
  10. package/dist/cjs/schemas/typescript/CompressedImage.d.ts.map +1 -1
  11. package/dist/cjs/schemas/typescript/CubePrimitive.d.ts +13 -0
  12. package/dist/cjs/schemas/typescript/CubePrimitive.d.ts.map +1 -0
  13. package/dist/cjs/schemas/typescript/CubePrimitive.js +4 -0
  14. package/dist/cjs/schemas/typescript/CubePrimitive.js.map +1 -0
  15. package/dist/cjs/schemas/typescript/CylinderPrimitive.d.ts +17 -0
  16. package/dist/cjs/schemas/typescript/CylinderPrimitive.d.ts.map +1 -0
  17. package/dist/cjs/schemas/typescript/CylinderPrimitive.js +4 -0
  18. package/dist/cjs/schemas/typescript/CylinderPrimitive.js.map +1 -0
  19. package/dist/cjs/schemas/typescript/KeyValuePair.d.ts +8 -0
  20. package/dist/cjs/schemas/typescript/KeyValuePair.d.ts.map +1 -0
  21. package/dist/cjs/schemas/typescript/KeyValuePair.js +4 -0
  22. package/dist/cjs/schemas/typescript/KeyValuePair.js.map +1 -0
  23. package/dist/cjs/schemas/typescript/LinePrimitive.d.ts +28 -0
  24. package/dist/cjs/schemas/typescript/LinePrimitive.d.ts.map +1 -0
  25. package/dist/cjs/schemas/typescript/LinePrimitive.js +4 -0
  26. package/dist/cjs/schemas/typescript/LinePrimitive.js.map +1 -0
  27. package/dist/cjs/schemas/typescript/LineType.d.ts +10 -0
  28. package/dist/cjs/schemas/typescript/LineType.d.ts.map +1 -0
  29. package/dist/cjs/schemas/typescript/LineType.js +15 -0
  30. package/dist/cjs/schemas/typescript/LineType.js.map +1 -0
  31. package/dist/cjs/schemas/typescript/ModelPrimitive.d.ts +21 -0
  32. package/dist/cjs/schemas/typescript/ModelPrimitive.d.ts.map +1 -0
  33. package/dist/cjs/schemas/typescript/ModelPrimitive.js +4 -0
  34. package/dist/cjs/schemas/typescript/ModelPrimitive.js.map +1 -0
  35. package/dist/cjs/schemas/typescript/PointsAnnotation.d.ts +5 -1
  36. package/dist/cjs/schemas/typescript/PointsAnnotation.d.ts.map +1 -1
  37. package/dist/cjs/schemas/typescript/RawImage.d.ts +2 -0
  38. package/dist/cjs/schemas/typescript/RawImage.d.ts.map +1 -1
  39. package/dist/cjs/schemas/typescript/SceneEntity.d.ts +43 -0
  40. package/dist/cjs/schemas/typescript/SceneEntity.d.ts.map +1 -0
  41. package/dist/cjs/schemas/typescript/SceneEntity.js +4 -0
  42. package/dist/cjs/schemas/typescript/SceneEntity.js.map +1 -0
  43. package/dist/cjs/schemas/typescript/SceneEntityDeletion.d.ts +12 -0
  44. package/dist/cjs/schemas/typescript/SceneEntityDeletion.d.ts.map +1 -0
  45. package/dist/cjs/schemas/typescript/SceneEntityDeletion.js +4 -0
  46. package/dist/cjs/schemas/typescript/SceneEntityDeletion.js.map +1 -0
  47. package/dist/cjs/schemas/typescript/SceneEntityDeletionType.d.ts +8 -0
  48. package/dist/cjs/schemas/typescript/SceneEntityDeletionType.d.ts.map +1 -0
  49. package/dist/cjs/schemas/typescript/SceneEntityDeletionType.js +13 -0
  50. package/dist/cjs/schemas/typescript/SceneEntityDeletionType.js.map +1 -0
  51. package/dist/cjs/schemas/typescript/SceneUpdate.d.ts +10 -0
  52. package/dist/cjs/schemas/typescript/SceneUpdate.d.ts.map +1 -0
  53. package/dist/cjs/schemas/typescript/SceneUpdate.js +4 -0
  54. package/dist/cjs/schemas/typescript/SceneUpdate.js.map +1 -0
  55. package/dist/cjs/schemas/typescript/SpherePrimitive.d.ts +13 -0
  56. package/dist/cjs/schemas/typescript/SpherePrimitive.d.ts.map +1 -0
  57. package/dist/cjs/schemas/typescript/SpherePrimitive.js +4 -0
  58. package/dist/cjs/schemas/typescript/SpherePrimitive.js.map +1 -0
  59. package/dist/cjs/schemas/typescript/TextPrimitive.d.ts +18 -0
  60. package/dist/cjs/schemas/typescript/TextPrimitive.d.ts.map +1 -0
  61. package/dist/cjs/schemas/typescript/TextPrimitive.js +4 -0
  62. package/dist/cjs/schemas/typescript/TextPrimitive.js.map +1 -0
  63. package/dist/cjs/schemas/typescript/TriangleListPrimitive.d.ts +21 -0
  64. package/dist/cjs/schemas/typescript/TriangleListPrimitive.d.ts.map +1 -0
  65. package/dist/cjs/schemas/typescript/TriangleListPrimitive.js +4 -0
  66. package/dist/cjs/schemas/typescript/TriangleListPrimitive.js.map +1 -0
  67. package/dist/cjs/schemas/typescript/index.d.ts +14 -0
  68. package/dist/cjs/schemas/typescript/index.d.ts.map +1 -1
  69. package/dist/cjs/schemas/typescript/index.js +14 -0
  70. package/dist/cjs/schemas/typescript/index.js.map +1 -1
  71. package/dist/cjs/src/generateMarkdown.d.ts.map +1 -1
  72. package/dist/cjs/src/generateMarkdown.js +3 -1
  73. package/dist/cjs/src/generateMarkdown.js.map +1 -1
  74. package/dist/cjs/src/generateProto.d.ts.map +1 -1
  75. package/dist/cjs/src/generateProto.js +21 -3
  76. package/dist/cjs/src/generateProto.js.map +1 -1
  77. package/dist/cjs/src/generateProto.test.js +22 -22
  78. package/dist/cjs/src/schemas.d.ts +15 -1
  79. package/dist/cjs/src/schemas.d.ts.map +1 -1
  80. package/dist/cjs/src/schemas.js +569 -79
  81. package/dist/cjs/src/schemas.js.map +1 -1
  82. package/dist/cjs/src/schemas.test.js +17 -0
  83. package/dist/cjs/src/schemas.test.js.map +1 -1
  84. package/dist/cjs/src/testFixtures.d.ts.map +1 -1
  85. package/dist/cjs/src/testFixtures.js +1 -0
  86. package/dist/cjs/src/testFixtures.js.map +1 -1
  87. package/dist/cjs/src/types.d.ts +18 -16
  88. package/dist/cjs/src/types.d.ts.map +1 -1
  89. package/dist/esm/schemas/typescript/ArrowPrimitive.d.ts +18 -0
  90. package/dist/esm/schemas/typescript/ArrowPrimitive.d.ts.map +1 -0
  91. package/dist/esm/schemas/typescript/ArrowPrimitive.js +3 -0
  92. package/dist/esm/schemas/typescript/ArrowPrimitive.js.map +1 -0
  93. package/dist/esm/schemas/typescript/CameraCalibration.d.ts +2 -0
  94. package/dist/esm/schemas/typescript/CameraCalibration.d.ts.map +1 -1
  95. package/dist/esm/schemas/typescript/CompressedImage.d.ts +2 -0
  96. package/dist/esm/schemas/typescript/CompressedImage.d.ts.map +1 -1
  97. package/dist/esm/schemas/typescript/CubePrimitive.d.ts +13 -0
  98. package/dist/esm/schemas/typescript/CubePrimitive.d.ts.map +1 -0
  99. package/dist/esm/schemas/typescript/CubePrimitive.js +3 -0
  100. package/dist/esm/schemas/typescript/CubePrimitive.js.map +1 -0
  101. package/dist/esm/schemas/typescript/CylinderPrimitive.d.ts +17 -0
  102. package/dist/esm/schemas/typescript/CylinderPrimitive.d.ts.map +1 -0
  103. package/dist/esm/schemas/typescript/CylinderPrimitive.js +3 -0
  104. package/dist/esm/schemas/typescript/CylinderPrimitive.js.map +1 -0
  105. package/dist/esm/schemas/typescript/KeyValuePair.d.ts +8 -0
  106. package/dist/esm/schemas/typescript/KeyValuePair.d.ts.map +1 -0
  107. package/dist/esm/schemas/typescript/KeyValuePair.js +3 -0
  108. package/dist/esm/schemas/typescript/KeyValuePair.js.map +1 -0
  109. package/dist/esm/schemas/typescript/LinePrimitive.d.ts +28 -0
  110. package/dist/esm/schemas/typescript/LinePrimitive.d.ts.map +1 -0
  111. package/dist/esm/schemas/typescript/LinePrimitive.js +3 -0
  112. package/dist/esm/schemas/typescript/LinePrimitive.js.map +1 -0
  113. package/dist/esm/schemas/typescript/LineType.d.ts +10 -0
  114. package/dist/esm/schemas/typescript/LineType.d.ts.map +1 -0
  115. package/dist/esm/schemas/typescript/LineType.js +12 -0
  116. package/dist/esm/schemas/typescript/LineType.js.map +1 -0
  117. package/dist/esm/schemas/typescript/ModelPrimitive.d.ts +21 -0
  118. package/dist/esm/schemas/typescript/ModelPrimitive.d.ts.map +1 -0
  119. package/dist/esm/schemas/typescript/ModelPrimitive.js +3 -0
  120. package/dist/esm/schemas/typescript/ModelPrimitive.js.map +1 -0
  121. package/dist/esm/schemas/typescript/PointsAnnotation.d.ts +5 -1
  122. package/dist/esm/schemas/typescript/PointsAnnotation.d.ts.map +1 -1
  123. package/dist/esm/schemas/typescript/RawImage.d.ts +2 -0
  124. package/dist/esm/schemas/typescript/RawImage.d.ts.map +1 -1
  125. package/dist/esm/schemas/typescript/SceneEntity.d.ts +43 -0
  126. package/dist/esm/schemas/typescript/SceneEntity.d.ts.map +1 -0
  127. package/dist/esm/schemas/typescript/SceneEntity.js +3 -0
  128. package/dist/esm/schemas/typescript/SceneEntity.js.map +1 -0
  129. package/dist/esm/schemas/typescript/SceneEntityDeletion.d.ts +12 -0
  130. package/dist/esm/schemas/typescript/SceneEntityDeletion.d.ts.map +1 -0
  131. package/dist/esm/schemas/typescript/SceneEntityDeletion.js +3 -0
  132. package/dist/esm/schemas/typescript/SceneEntityDeletion.js.map +1 -0
  133. package/dist/esm/schemas/typescript/SceneEntityDeletionType.d.ts +8 -0
  134. package/dist/esm/schemas/typescript/SceneEntityDeletionType.d.ts.map +1 -0
  135. package/dist/esm/schemas/typescript/SceneEntityDeletionType.js +10 -0
  136. package/dist/esm/schemas/typescript/SceneEntityDeletionType.js.map +1 -0
  137. package/dist/esm/schemas/typescript/SceneUpdate.d.ts +10 -0
  138. package/dist/esm/schemas/typescript/SceneUpdate.d.ts.map +1 -0
  139. package/dist/esm/schemas/typescript/SceneUpdate.js +3 -0
  140. package/dist/esm/schemas/typescript/SceneUpdate.js.map +1 -0
  141. package/dist/esm/schemas/typescript/SpherePrimitive.d.ts +13 -0
  142. package/dist/esm/schemas/typescript/SpherePrimitive.d.ts.map +1 -0
  143. package/dist/esm/schemas/typescript/SpherePrimitive.js +3 -0
  144. package/dist/esm/schemas/typescript/SpherePrimitive.js.map +1 -0
  145. package/dist/esm/schemas/typescript/TextPrimitive.d.ts +18 -0
  146. package/dist/esm/schemas/typescript/TextPrimitive.d.ts.map +1 -0
  147. package/dist/esm/schemas/typescript/TextPrimitive.js +3 -0
  148. package/dist/esm/schemas/typescript/TextPrimitive.js.map +1 -0
  149. package/dist/esm/schemas/typescript/TriangleListPrimitive.d.ts +21 -0
  150. package/dist/esm/schemas/typescript/TriangleListPrimitive.d.ts.map +1 -0
  151. package/dist/esm/schemas/typescript/TriangleListPrimitive.js +3 -0
  152. package/dist/esm/schemas/typescript/TriangleListPrimitive.js.map +1 -0
  153. package/dist/esm/schemas/typescript/index.d.ts +14 -0
  154. package/dist/esm/schemas/typescript/index.d.ts.map +1 -1
  155. package/dist/esm/schemas/typescript/index.js +14 -0
  156. package/dist/esm/schemas/typescript/index.js.map +1 -1
  157. package/dist/esm/src/generateMarkdown.d.ts.map +1 -1
  158. package/dist/esm/src/generateMarkdown.js +3 -1
  159. package/dist/esm/src/generateMarkdown.js.map +1 -1
  160. package/dist/esm/src/generateProto.d.ts.map +1 -1
  161. package/dist/esm/src/generateProto.js +21 -3
  162. package/dist/esm/src/generateProto.js.map +1 -1
  163. package/dist/esm/src/generateProto.test.js +22 -22
  164. package/dist/esm/src/schemas.d.ts +15 -1
  165. package/dist/esm/src/schemas.d.ts.map +1 -1
  166. package/dist/esm/src/schemas.js +569 -79
  167. package/dist/esm/src/schemas.js.map +1 -1
  168. package/dist/esm/src/schemas.test.js +17 -0
  169. package/dist/esm/src/schemas.test.js.map +1 -1
  170. package/dist/esm/src/testFixtures.d.ts.map +1 -1
  171. package/dist/esm/src/testFixtures.js +1 -0
  172. package/dist/esm/src/testFixtures.js.map +1 -1
  173. package/dist/esm/src/types.d.ts +18 -16
  174. package/dist/esm/src/types.d.ts.map +1 -1
  175. package/package.json +1 -1
  176. package/schemas/README.md +1098 -14
  177. package/schemas/jsonschema/ArrowPrimitive.json +96 -0
  178. package/schemas/jsonschema/CameraCalibration.json +4 -0
  179. package/schemas/jsonschema/CompressedImage.json +4 -0
  180. package/schemas/jsonschema/CubePrimitive.json +99 -0
  181. package/schemas/jsonschema/CylinderPrimitive.json +107 -0
  182. package/schemas/jsonschema/ImageAnnotations.json +28 -1
  183. package/schemas/jsonschema/KeyValuePair.json +16 -0
  184. package/schemas/jsonschema/LinePrimitive.json +167 -0
  185. package/schemas/jsonschema/ModelPrimitive.json +116 -0
  186. package/schemas/jsonschema/PointsAnnotation.json +28 -1
  187. package/schemas/jsonschema/RawImage.json +4 -0
  188. package/schemas/jsonschema/SceneEntity.json +1012 -0
  189. package/schemas/jsonschema/SceneEntityDeletion.json +44 -0
  190. package/schemas/jsonschema/SceneUpdate.json +1070 -0
  191. package/schemas/jsonschema/SpherePrimitive.json +99 -0
  192. package/schemas/jsonschema/TextPrimitive.json +96 -0
  193. package/schemas/jsonschema/TriangleListPrimitive.json +138 -0
  194. package/schemas/proto/foxglove/ArrowPrimitive.proto +29 -0
  195. package/schemas/proto/foxglove/CameraCalibration.proto +3 -0
  196. package/schemas/proto/foxglove/CompressedImage.proto +3 -0
  197. package/schemas/proto/foxglove/CubePrimitive.proto +21 -0
  198. package/schemas/proto/foxglove/CylinderPrimitive.proto +27 -0
  199. package/schemas/proto/foxglove/KeyValuePair.proto +14 -0
  200. package/schemas/proto/foxglove/LinePrimitive.proto +49 -0
  201. package/schemas/proto/foxglove/ModelPrimitive.proto +33 -0
  202. package/schemas/proto/foxglove/PointsAnnotation.proto +9 -3
  203. package/schemas/proto/foxglove/RawImage.proto +3 -0
  204. package/schemas/proto/foxglove/SceneEntity.proto +62 -0
  205. package/schemas/proto/foxglove/SceneEntityDeletion.proto +27 -0
  206. package/schemas/proto/foxglove/SceneUpdate.proto +17 -0
  207. package/schemas/proto/foxglove/SpherePrimitive.proto +21 -0
  208. package/schemas/proto/foxglove/TextPrimitive.proto +29 -0
  209. package/schemas/proto/foxglove/TriangleListPrimitive.proto +29 -0
  210. package/schemas/ros1/ArrowPrimitive.msg +22 -0
  211. package/schemas/ros1/CameraCalibration.msg +3 -0
  212. package/schemas/ros1/CompressedImage.msg +3 -0
  213. package/schemas/ros1/CubePrimitive.msg +13 -0
  214. package/schemas/ros1/CylinderPrimitive.msg +19 -0
  215. package/schemas/ros1/KeyValuePair.msg +10 -0
  216. package/schemas/ros1/LinePrimitive.msg +39 -0
  217. package/schemas/ros1/ModelPrimitive.msg +25 -0
  218. package/schemas/ros1/PointsAnnotation.msg +7 -1
  219. package/schemas/ros1/RawImage.msg +3 -0
  220. package/schemas/ros1/SceneEntity.msg +46 -0
  221. package/schemas/ros1/SceneEntityDeletion.msg +19 -0
  222. package/schemas/ros1/SceneUpdate.msg +10 -0
  223. package/schemas/ros1/SpherePrimitive.msg +13 -0
  224. package/schemas/ros1/TextPrimitive.msg +22 -0
  225. package/schemas/ros1/TriangleListPrimitive.msg +21 -0
  226. package/schemas/ros2/ArrowPrimitive.msg +22 -0
  227. package/schemas/ros2/CameraCalibration.msg +3 -0
  228. package/schemas/ros2/CompressedImage.msg +3 -0
  229. package/schemas/ros2/CubePrimitive.msg +13 -0
  230. package/schemas/ros2/CylinderPrimitive.msg +19 -0
  231. package/schemas/ros2/KeyValuePair.msg +10 -0
  232. package/schemas/ros2/LinePrimitive.msg +39 -0
  233. package/schemas/ros2/ModelPrimitive.msg +25 -0
  234. package/schemas/ros2/PointsAnnotation.msg +7 -1
  235. package/schemas/ros2/RawImage.msg +3 -0
  236. package/schemas/ros2/SceneEntity.msg +46 -0
  237. package/schemas/ros2/SceneEntityDeletion.msg +19 -0
  238. package/schemas/ros2/SceneUpdate.msg +10 -0
  239. package/schemas/ros2/SpherePrimitive.msg +13 -0
  240. package/schemas/ros2/TextPrimitive.msg +22 -0
  241. package/schemas/ros2/TriangleListPrimitive.msg +21 -0
  242. package/schemas/typescript/ArrowPrimitive.ts +25 -0
  243. package/schemas/typescript/CameraCalibration.ts +3 -0
  244. package/schemas/typescript/CompressedImage.ts +3 -0
  245. package/schemas/typescript/CubePrimitive.ts +17 -0
  246. package/schemas/typescript/CylinderPrimitive.ts +23 -0
  247. package/schemas/typescript/KeyValuePair.ts +10 -0
  248. package/schemas/typescript/LinePrimitive.ts +37 -0
  249. package/schemas/typescript/LineType.ts +13 -0
  250. package/schemas/typescript/ModelPrimitive.ts +29 -0
  251. package/schemas/typescript/PointsAnnotation.ts +7 -1
  252. package/schemas/typescript/RawImage.ts +3 -0
  253. package/schemas/typescript/SceneEntity.ts +58 -0
  254. package/schemas/typescript/SceneEntityDeletion.ts +16 -0
  255. package/schemas/typescript/SceneEntityDeletionType.ts +10 -0
  256. package/schemas/typescript/SceneUpdate.ts +13 -0
  257. package/schemas/typescript/SpherePrimitive.ts +17 -0
  258. package/schemas/typescript/TextPrimitive.ts +25 -0
  259. package/schemas/typescript/TriangleListPrimitive.ts +27 -0
  260. package/schemas/typescript/index.ts +14 -0
  261. package/src/generateMarkdown.ts +3 -1
  262. package/src/generateProto.test.ts +22 -22
  263. package/src/generateProto.ts +33 -4
  264. package/src/schemas.test.ts +19 -0
  265. package/src/schemas.ts +619 -79
  266. package/src/testFixtures.ts +1 -0
  267. package/src/types.ts +13 -10
@@ -0,0 +1,10 @@
1
+ # foxglove_msgs/msg/SceneUpdate
2
+ # (Experimental, subject to change) An update to the entities displayed in a 3D scene
3
+
4
+ # Generated by https://github.com/foxglove/schemas
5
+
6
+ # Scene entities to delete
7
+ foxglove_msgs/SceneEntityDeletion[] deletions
8
+
9
+ # Scene entities to add or replace
10
+ foxglove_msgs/SceneEntity[] entities
@@ -0,0 +1,13 @@
1
+ # foxglove_msgs/msg/SpherePrimitive
2
+ # (Experimental, subject to change) A primitive representing a sphere or ellipsoid
3
+
4
+ # Generated by https://github.com/foxglove/schemas
5
+
6
+ # Position of the center of the sphere and orientation of the sphere
7
+ geometry_msgs/Pose pose
8
+
9
+ # Size (diameter) of the sphere along each axis
10
+ geometry_msgs/Vector3 size
11
+
12
+ # Color of the sphere
13
+ foxglove_msgs/Color color
@@ -0,0 +1,22 @@
1
+ # foxglove_msgs/msg/TextPrimitive
2
+ # (Experimental, subject to change) A primitive representing a text label
3
+
4
+ # Generated by https://github.com/foxglove/schemas
5
+
6
+ # 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.
7
+ geometry_msgs/Pose pose
8
+
9
+ # Whether the text should respect `pose.orientation` (false) or always face the camera (true)
10
+ bool billboard
11
+
12
+ # Font size (height of one line of text)
13
+ float64 font_size
14
+
15
+ # 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)
16
+ bool scale_invariant
17
+
18
+ # Color of the text
19
+ foxglove_msgs/Color color
20
+
21
+ # Text
22
+ string text
@@ -0,0 +1,21 @@
1
+ # foxglove_msgs/msg/TriangleListPrimitive
2
+ # (Experimental, subject to change) A primitive representing a set of triangles or a surface tiled by triangles
3
+
4
+ # Generated by https://github.com/foxglove/schemas
5
+
6
+ # Origin of triangles relative to reference frame
7
+ geometry_msgs/Pose pose
8
+
9
+ # Vertices to use for triangles, interpreted as a list of triples (0-1-2, 3-4-5, ...)
10
+ geometry_msgs/Point[] points
11
+
12
+ # Solid color to use for the whole shape. One of `color` or `colors` must be provided.
13
+ foxglove_msgs/Color color
14
+
15
+ # Per-vertex colors (if specified, must have the same length as `points`). One of `color` or `colors` must be provided.
16
+ foxglove_msgs/Color[] colors
17
+
18
+ # Indices into the `points` and `colors` attribute arrays, which can be used to avoid duplicating attribute data.
19
+ #
20
+ # 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).
21
+ uint32[] indices
@@ -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 an arrow */
7
+ export type ArrowPrimitive = {
8
+ /** Position of the arrow's tail and orientation of the arrow. Identity orientation means the arrow points in the +x direction. */
9
+ pose: Pose;
10
+
11
+ /** Length of the arrow shaft */
12
+ shaft_length: number;
13
+
14
+ /** Diameter of the arrow shaft */
15
+ shaft_diameter: number;
16
+
17
+ /** Length of the arrow head */
18
+ head_length: number;
19
+
20
+ /** Diameter of the arrow head */
21
+ head_diameter: number;
22
+
23
+ /** Color of the arrow */
24
+ color: Color;
25
+ };
@@ -7,6 +7,9 @@ export type CameraCalibration = {
7
7
  /** Timestamp of calibration data */
8
8
  timestamp: Time;
9
9
 
10
+ /** Frame of reference for the camera. The origin of the frame is the optical center of the camera. +x points to the right in the image, +y points down, and +z points into the plane of the image. */
11
+ frame_id: string;
12
+
10
13
  /** Image width */
11
14
  width: number;
12
15
 
@@ -7,6 +7,9 @@ export type CompressedImage = {
7
7
  /** Timestamp of image */
8
8
  timestamp: Time;
9
9
 
10
+ /** Frame of reference for the image. The origin of the frame is the optical center of the camera. +x points to the right in the image, +y points down, and +z points into the plane of the image. */
11
+ frame_id: string;
12
+
10
13
  /** Compressed image data */
11
14
  data: Uint8Array;
12
15
 
@@ -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 cube or rectangular prism */
8
+ export type CubePrimitive = {
9
+ /** Position of the center of the cube and orientation of the cube */
10
+ pose: Pose;
11
+
12
+ /** Size of the cube along each axis */
13
+ size: Vector3;
14
+
15
+ /** Color of the arrow */
16
+ color: Color;
17
+ };
@@ -0,0 +1,23 @@
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 cylinder, elliptic cylinder, or truncated cone */
8
+ export type CylinderPrimitive = {
9
+ /** Position of the center of the cylinder and orientation of the cylinder. The flat face(s) are perpendicular to the z-axis. */
10
+ pose: Pose;
11
+
12
+ /** Size of the cylinder's bounding box */
13
+ size: Vector3;
14
+
15
+ /** 0-1, ratio of the diameter of the cylinder's bottom face (min z) to the bottom of the bounding box */
16
+ bottom_scale: number;
17
+
18
+ /** 0-1, ratio of the diameter of the cylinder's top face (max z) to the top of the bounding box */
19
+ top_scale: number;
20
+
21
+ /** Color of the cylinder */
22
+ color: Color;
23
+ };
@@ -0,0 +1,10 @@
1
+ // Generated by https://github.com/foxglove/schemas
2
+
3
+ /** (Experimental, subject to change) A key with its associated value */
4
+ export type KeyValuePair = {
5
+ /** Key */
6
+ key: string;
7
+
8
+ /** Value */
9
+ value: string;
10
+ };
@@ -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
+ };
@@ -16,9 +16,15 @@ export type PointsAnnotation = {
16
16
  /** Points in 2D image coordinates */
17
17
  points: Point2[];
18
18
 
19
- /** Outline colors */
19
+ /** Outline color */
20
+ outline_color: Color;
21
+
22
+ /** Per-point colors, if `type` is `POINTS`, or per-segment stroke colors, if `type` is `LINE_LIST`. */
20
23
  outline_colors: Color[];
21
24
 
22
25
  /** Fill color */
23
26
  fill_color: Color;
27
+
28
+ /** Stroke thickness */
29
+ thickness: number;
24
30
  };
@@ -7,6 +7,9 @@ export type RawImage = {
7
7
  /** Timestamp of image */
8
8
  timestamp: Time;
9
9
 
10
+ /** Frame of reference for the image. The origin of the frame is the optical center of the camera. +x points to the right in the image, +y points down, and +z points into the plane of the image. */
11
+ frame_id: string;
12
+
10
13
  /** Image width */
11
14
  width: number;
12
15
 
@@ -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";
@@ -11,7 +11,9 @@ export function generateMarkdown(
11
11
  `\
12
12
  # Foxglove schemas
13
13
 
14
- Generated by https://github.com/foxglove/schemas`,
14
+ See [Foxglove Schemas documentation](https://foxglove.dev/docs/studio/messages).
15
+
16
+ All schemas are generated from [schemas.ts](/src/schemas.ts).`,
15
17
 
16
18
  "## Contents",
17
19
 
@@ -37,67 +37,67 @@ describe("generateProto", () => {
37
37
  bool field_boolean = 3;
38
38
 
39
39
  // bytes field
40
- bytes field_bytes = 4;
40
+ bytes field_bytes = 5;
41
41
 
42
42
  // float64 field
43
- double field_float64 = 5;
43
+ double field_float64 = 6;
44
44
 
45
45
  // uint32 field
46
- fixed32 field_uint32 = 6;
46
+ fixed32 field_uint32 = 7;
47
47
 
48
48
  // string field
49
- string field_string = 7;
49
+ string field_string = 8;
50
50
 
51
51
  // duration array field
52
- repeated google.protobuf.Duration field_duration_array = 8;
52
+ repeated google.protobuf.Duration field_duration_array = 9;
53
53
 
54
54
  // time array field
55
- repeated google.protobuf.Timestamp field_time_array = 9;
55
+ repeated google.protobuf.Timestamp field_time_array = 10;
56
56
 
57
57
  // boolean array field
58
- repeated bool field_boolean_array = 10;
58
+ repeated bool field_boolean_array = 11;
59
59
 
60
60
  // bytes array field
61
- repeated bytes field_bytes_array = 11;
61
+ repeated bytes field_bytes_array = 12;
62
62
 
63
63
  // float64 array field
64
- repeated double field_float64_array = 12;
64
+ repeated double field_float64_array = 13;
65
65
 
66
66
  // uint32 array field
67
- repeated fixed32 field_uint32_array = 13;
67
+ repeated fixed32 field_uint32_array = 14;
68
68
 
69
69
  // string array field
70
- repeated string field_string_array = 14;
70
+ repeated string field_string_array = 15;
71
71
 
72
72
  // duration fixed-length array field
73
- repeated google.protobuf.Duration field_duration_fixed_array = 15; // length 3
73
+ repeated google.protobuf.Duration field_duration_fixed_array = 16; // length 3
74
74
 
75
75
  // time fixed-length array field
76
- repeated google.protobuf.Timestamp field_time_fixed_array = 16; // length 3
76
+ repeated google.protobuf.Timestamp field_time_fixed_array = 17; // length 3
77
77
 
78
78
  // boolean fixed-length array field
79
- repeated bool field_boolean_fixed_array = 17; // length 3
79
+ repeated bool field_boolean_fixed_array = 18; // length 3
80
80
 
81
81
  // bytes fixed-length array field
82
- repeated bytes field_bytes_fixed_array = 18; // length 3
82
+ repeated bytes field_bytes_fixed_array = 19; // length 3
83
83
 
84
84
  // float64 fixed-length array field
85
- repeated double field_float64_fixed_array = 19; // length 3
85
+ repeated double field_float64_fixed_array = 20; // length 3
86
86
 
87
87
  // uint32 fixed-length array field
88
- repeated fixed32 field_uint32_fixed_array = 20; // length 3
88
+ repeated fixed32 field_uint32_fixed_array = 21; // length 3
89
89
 
90
90
  // string fixed-length array field
91
- repeated string field_string_fixed_array = 21; // length 3
91
+ repeated string field_string_fixed_array = 22; // length 3
92
92
 
93
93
  // An enum field
94
- ExampleProtoEnum field_enum = 22;
94
+ ExampleProtoEnum field_enum = 23;
95
95
 
96
96
  // An enum array field
97
- repeated ExampleProtoEnum field_enum_array = 23;
97
+ repeated ExampleProtoEnum field_enum_array = 24;
98
98
 
99
99
  // A nested field
100
- foxglove.NestedMessage field_nested = 24;
100
+ foxglove.NestedMessage field_nested = 25;
101
101
 
102
102
  // A nested array field
103
103
  // With
@@ -105,7 +105,7 @@ describe("generateProto", () => {
105
105
  // very
106
106
  // long
107
107
  // description
108
- repeated foxglove.NestedMessage field_nested_array = 25;
108
+ repeated foxglove.NestedMessage field_nested_array = 4;
109
109
  }
110
110
  "
111
111
  `);
@@ -1,4 +1,9 @@
1
- import { FoxgloveEnumSchema, FoxgloveMessageSchema, FoxglovePrimitive } from "./types";
1
+ import {
2
+ FoxgloveEnumSchema,
3
+ FoxgloveMessageField,
4
+ FoxgloveMessageSchema,
5
+ FoxglovePrimitive,
6
+ } from "./types";
2
7
 
3
8
  function primitiveToProto(type: Exclude<FoxglovePrimitive, "time" | "duration">) {
4
9
  switch (type) {
@@ -35,9 +40,33 @@ export function generateProto(
35
40
  );
36
41
  }
37
42
 
38
- let fieldNumber = 1;
43
+ const explicitFieldNumbers = new Set<number>();
44
+ for (const field of schema.fields) {
45
+ if (field.protobufFieldNumber != undefined) {
46
+ if (explicitFieldNumbers.has(field.protobufFieldNumber)) {
47
+ throw new Error(
48
+ `More than one field with protobufFieldNumber ${field.protobufFieldNumber}`,
49
+ );
50
+ }
51
+ explicitFieldNumbers.add(field.protobufFieldNumber);
52
+ }
53
+ }
54
+
55
+ let nextFieldNumber = 1;
56
+ const numberedFields = schema.fields.map(
57
+ (field): FoxgloveMessageField & { protobufFieldNumber: number } => {
58
+ if (field.protobufFieldNumber != undefined) {
59
+ return { ...field, protobufFieldNumber: field.protobufFieldNumber };
60
+ }
61
+ while (explicitFieldNumbers.has(nextFieldNumber)) {
62
+ ++nextFieldNumber;
63
+ }
64
+ return { ...field, protobufFieldNumber: nextFieldNumber++ };
65
+ },
66
+ );
67
+
39
68
  const imports = new Set<string>();
40
- const fields = schema.fields.map((field) => {
69
+ const fields = numberedFields.map((field) => {
41
70
  const lineComments: string[] = [];
42
71
  const qualifiers: string[] = [];
43
72
  if (field.array != undefined) {
@@ -70,7 +99,7 @@ export function generateProto(
70
99
  .trim()
71
100
  .split("\n")
72
101
  .map((line) => ` // ${line}\n`)
73
- .join("")} ${qualifiers.join(" ")} ${field.name} = ${fieldNumber++};${
102
+ .join("")} ${qualifiers.join(" ")} ${field.name} = ${field.protobufFieldNumber};${
74
103
  lineComments.length > 0 ? " // " + lineComments.join(", ") : ""
75
104
  }`;
76
105
  });