Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ImageAnnotation schemas' coordinate fields with comment specifying the coordinate space #150

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading