NUbots / NUpbr

Physics Based Rendering (PBR) pipeline for generating realistic semi-synthetic data
MIT License
2 stars 2 forks source link

Fix invalid rotation matrices #24

Closed jpptm closed 1 year ago

jpptm commented 1 year ago

Parenting the camera to the left eye resulted to the camera's transform being an inverse of the left eye's transform which resulted to an incorrect rotation matrix for the camera. This fix constrains the camera's location onto the left eye instead of parenting it. This way, the camera gets to keep its rotation transform with respect to world. The script outputs the main camera's world matrix after each iteration for checking.

Some commented code and unused imports were also removed as I read through the code.

jpptm commented 1 year ago

It is recommended that the ball stays inside the field, specifically very close to the origin but not necessarily on the origin or this happens image

ysims commented 1 year ago

It is recommended that the ball stays inside the field, specifically very close to the origin but not necessarily on the origin or this happens

Are you referring to the camera looking off? That should be fixed, we can't have the ball always close otherwise we will have the opposite problem to before (robot doesn't learn to see balls far away).

A-Herfel commented 1 year ago

Ethan and I have changed around the constraints and added some conditions. The robot should now no longer look backwards (causing camera to flip or it to look inside its body) and camera should stay fairly level. Should also check that the printed matrices are valid.

ysims commented 1 year ago

Is this ready? @jpptm

jpptm commented 1 year ago

@ysims 40 images in and everything looks good

jpptm commented 1 year ago

Looks like its works @ysims