-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add Foxglove schemas and generate ros/proto/jsonschema definitions #14
Conversation
|
||
message Duration { | ||
fixed32 sec = 1; | ||
fixed32 nsec = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think nsec is suppose to be unsigned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, indeed that is what ROS does. How does one handle negative durations? is -1.5sec equal to {sec:-2,nsec:0.5e9}
or {sec:-1,nsec:0.5e9}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{sec:-1,nsec:0.5e9}
The sign of seconds is what matters. The nanoseconds bit is how many nanoseconds within the second.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure?
In ROS 1, both are signed for Duration:
https://github.com/ros/roscpp_core/blob/noetic-devel/rostime/include/ros/duration.h#L75
while both are unsigned for Time:
https://github.com/ros/roscpp_core/blob/noetic-devel/rostime/include/ros/time.h#L133
...ok, after a lot of digging, I finally found a direct example, in which they show that -0.5sec
is represented in the .msg as {sec:-1, nsec:500000000}
(which means that because it's unsigned, the nsec part is always treated as an offset in the positive direction):
Curious why |
|
package foxglove; | ||
|
||
// List of fields included for every entity in an accompanying `data` field array | ||
message DataField { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PackedField?
StrideField?
{ | ||
"$comment": "Generated from Grid by @foxglove/message-schemas", | ||
"title": "Grid", | ||
"description": "A 2D grid of data", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this also be displayed in 3D space? (i.e in 3D mode for 3D panel)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but the grid itself is 2D
{ | ||
"$comment": "Generated from LaserScan by @foxglove/message-schemas", | ||
"title": "LaserScan", | ||
"description": "A a single scan from a planar laser range-finder", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#typo - remove duplicate "a"
Is the "single" necessary?
{ | ||
"$comment": "Generated from PointsAnnotation by @foxglove/message-schemas", | ||
"title": "PointsAnnotation", | ||
"description": "A set of points", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"An array of points to annotate a 2D image"?
Using consistent "An array of ..." prefix where necessary.
{ | ||
"$comment": "Generated from Pose by @foxglove/message-schemas", | ||
"title": "Pose", | ||
"description": "The position and orientation of an object or reference frame in 3D space", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"A position and orientation for an object or..."
{ | ||
"$comment": "Generated from Quaternion by @foxglove/message-schemas", | ||
"title": "Quaternion", | ||
"description": "A [quaternion](https://eater.net/quaternions) representing a rotation in 3D space", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"A rotation in 3D space."
Link and sentence structure is inconsistent with other descriptions. Not sure link is necessary with definition and schema below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the link is useful to have somewhere in the docs? Otherwise people who don't know what quaternions are have to google it themselves, which may not turn up easily understandable resources.
**Public-Facing Changes** Updated descriptions for several schemas. **Description** Clean up from review of #14
Public-Facing Changes
This package is now published on NPM as
@foxglove/message-schemas
, and is the source of truth for message schemas supported by Foxglove Studio, which are documented in https://foxglove.dev/docs/studio/messages/introduction. We also generate ROS 1/2, Protobuf, JSON Schema, and TypeScript definitions from these schemas.Description
The website will be updated to pull schemas from this repository.
generate FileDescriptorSet for easy use with mcap/websocketCloses https://github.com/foxglove/studio/issues/3043