Skip to content

Document the coordinate system #312

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

PeterJCLaw
Copy link
Contributor

@PeterJCLaw PeterJCLaw commented Oct 18, 2022

The documents each of the coordinate types, establishing the nature of their axes including the respective origins and positive directions.

This is based on local testing with a two cameras, one for which I do not have a valid calibration (though I did find one with the same resolution in sr-robot3) and the confirmed using a C270.

There is definitely some oddness here as the results suggest that positive Y axis values are "down" in the camera's field of view.
Validation of this with another camera would be most welcome.

I've built this on top of #304 in part to avoid conflicts, but also because that PR establishes much more clearly that the types have intended semantics rather than allowing them to be essentially shallow wrappers around whatever data happens to fit their shape.

These changes will inevitably conflict with #302, however I suggest we aim to merge this PR first (as it doesn't change behaviour) and then come back to that one. To that end I've ended up copying over some of the relevant changes in where some of the logic lies as well as the tests, but all keeping the behaviour as it is in master.

@PeterJCLaw PeterJCLaw force-pushed the document-coordinate-system branch 3 times, most recently from 00a8153 to 80865cd Compare October 18, 2022 17:08
@PeterJCLaw PeterJCLaw marked this pull request as ready for review October 18, 2022 17:10
@PeterJCLaw PeterJCLaw force-pushed the document-coordinate-system branch from 80865cd to 2ed9f0f Compare October 20, 2022 21:02
Positive values indicate a rotation counter-clockwise from the
perspective of the camera.

Zero values for April Tags markers have the marker reference point at
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Not all markers supported by Zoloto are April.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, this is why it's specified which markers this applies to. I haven't tested nor explored the values for the other marker types.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This portion of the marker logic doesn't change between dictionaries, they're all top left.

Suggested change
Zero values for April Tags markers have the marker reference point at
Zero values for markers have the marker reference point at

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this hold for all the other places where this PR mentions April Tags, or just this one?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I hadn't spotted the others. Yes it does hold for those too.

RealOrangeOne
RealOrangeOne previously approved these changes Nov 19, 2022
Copy link
Owner

@RealOrangeOne RealOrangeOne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with the approach here, definitely think it makes things a lot more useful.

I do need to flesh out the actual documentation much more, and this will make a good basis for that!

It would be great to document the orientation of the axes etc.,
however that's already in flight in RealOrangeOne#302
so leaving that for now.
It would be great to document the orientation of the axes etc.,
however that's already in flight in RealOrangeOne#302
so leaving that for now.
This was determined by experimentation with an old printed marker
I had to hand. There's some slight oddness here in that the values
suggest the marker I have is upside down, however that seems to
disagree with other sources I've checked for the same marker.

Also worth noting that I don't have a calibration for the camera
I used, so this is based off another calibration I found for the
same resolution.
Derived from testing of the current system.

This includes moving the construction of the coordinates into the
type as that is functionally where the definition of the nature of
the spherical coordinates comes from.
This helps understand the relationship between these and ensures
that changes aren't accidental.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants