Skip to content

Commit

Permalink
update ImageAnnotation coordinate fields with comment specifying the …
Browse files Browse the repository at this point in the history
…coordinate space
  • Loading branch information
snosenzo committed May 23, 2024
1 parent a4b0b35 commit 1515b47
Show file tree
Hide file tree
Showing 32 changed files with 90 additions and 45 deletions.
15 changes: 12 additions & 3 deletions internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ export type CircleAnnotation = {
/** Timestamp of circle */
timestamp: Time;
/** Center of the circle in 2D image coordinates (pixels) */
/**
* Center of the circle in 2D image coordinates (pixels).
* The coordinate uses the top-left corner of the top-left pixel of the image as the origin.
*/
position: Point2;
/** Circle diameter in pixels */
Expand Down Expand Up @@ -708,7 +711,10 @@ export type PointsAnnotation = {
/** Type of points annotation to draw */
type: PointsAnnotationType;
/** Points in 2D image coordinates (pixels) */
/**
* Points in 2D image coordinates (pixels).
* These coordinates use the top-left corner of the top-left pixel of the image as the origin.
*/
points: Point2[];
/** Outline color */
Expand Down Expand Up @@ -857,7 +863,10 @@ export type TextAnnotation = {
/** Timestamp of annotation */
timestamp: Time;
/** Bottom-left origin of the text label in 2D image coordinates (pixels) */
/**
* Bottom-left origin of the text label in 2D image coordinates (pixels).
* The coordinate uses the top-left corner of the top-left pixel of the image as the origin.
*/
position: Point2;
/** Text to display */
Expand Down
9 changes: 6 additions & 3 deletions internal/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,8 @@ const CircleAnnotation: FoxgloveMessageSchema = {
{
name: "position",
type: { type: "nested", schema: Point2 },
description: "Center of the circle in 2D image coordinates (pixels)",
description:
"Center of the circle in 2D image coordinates (pixels).\nThe coordinate uses the top-left corner of the top-left pixel of the image as the origin.",
},
{
name: "diameter",
Expand Down Expand Up @@ -1147,7 +1148,8 @@ const PointsAnnotation: FoxgloveMessageSchema = {
{
name: "points",
type: { type: "nested", schema: Point2 },
description: "Points in 2D image coordinates (pixels)",
description:
"Points in 2D image coordinates (pixels).\nThese coordinates use the top-left corner of the top-left pixel of the image as the origin.",
array: true,
},
{
Expand Down Expand Up @@ -1188,7 +1190,8 @@ const TextAnnotation: FoxgloveMessageSchema = {
{
name: "position",
type: { type: "nested", schema: Point2 },
description: "Bottom-left origin of the text label in 2D image coordinates (pixels)",
description:
"Bottom-left origin of the text label in 2D image coordinates (pixels).\nThe coordinate uses the top-left corner of the top-left pixel of the image as the origin.",
},
{
name: "text",
Expand Down
3 changes: 2 additions & 1 deletion ros_foxglove_msgs/ros1/CircleAnnotation.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ros_foxglove_msgs/ros1/PointsAnnotation.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ros_foxglove_msgs/ros1/TextAnnotation.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ros_foxglove_msgs/ros2/CircleAnnotation.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ros_foxglove_msgs/ros2/PointsAnnotation.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ros_foxglove_msgs/ros2/TextAnnotation.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions schemas/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/flatbuffer/CircleAnnotation.fbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/flatbuffer/PointsAnnotation.fbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/flatbuffer/TextAnnotation.fbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion schemas/jsonschema/CircleAnnotation.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions schemas/jsonschema/ImageAnnotations.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion schemas/jsonschema/PointsAnnotation.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion schemas/jsonschema/TextAnnotation.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions schemas/jsonschema/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/omgidl/foxglove/CircleAnnotation.idl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/omgidl/foxglove/PointsAnnotation.idl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/omgidl/foxglove/TextAnnotation.idl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/proto/foxglove/CircleAnnotation.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/proto/foxglove/PointsAnnotation.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/proto/foxglove/TextAnnotation.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/ros1/CircleAnnotation.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/ros1/PointsAnnotation.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/ros1/TextAnnotation.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schemas/ros2/CircleAnnotation.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1515b47

Please sign in to comment.