Skip to content
This repository was archived by the owner on Dec 30, 2025. It is now read-only.

Document the coordinate system - #312

Open
PeterJCLaw wants to merge 7 commits into
RealOrangeOne:masterfrom
PeterJCLaw:document-coordinate-system
Open

Document the coordinate system#312
PeterJCLaw wants to merge 7 commits into
RealOrangeOne:masterfrom
PeterJCLaw:document-coordinate-system

Conversation

@PeterJCLaw

@PeterJCLaw PeterJCLaw commented Oct 18, 2022

Copy link
Copy Markdown
Contributor

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
Comment thread zoloto/coords.py
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@RealOrangeOne RealOrangeOne left a comment

Copy link
Copy Markdown
Owner

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants