Skip to content

Convert the Viewpoint to FLU - #3538

Merged
lukicdarkoo merged 10 commits into
feature-enu-planfrom
feature-viewpoint-flu
Aug 6, 2021
Merged

lukicdarkoo merged 10 commits into
feature-enu-planfrom
feature-viewpoint-flu

Conversation

@lukicdarkoo

@lukicdarkoo lukicdarkoo commented Aug 4, 2021 •

Copy link
Copy Markdown
Member

Documentation
https://www.cyberbotics.com/doc/reference/viewpoint?version=feature-viewpoint-flu

Tasks:

  • Change the Viewpoint orientation to FLU
  • Fix mouse zoom
  • Fix mouse rotate
  • Fix mouse translate
  • Fix object translate
  • Fix object rotate
  • Fix apply force with mouse
  • Fix Billboard (only docs)
  • Fix Change View > Front View, ...
  • Fix Shift + move
  • Fix docs
  • Fix the coordinate system legend

@lukicdarkoo lukicdarkoo self-assigned this Aug 4, 2021
@lukicdarkoo lukicdarkoo added this to the R2021c milestone Aug 4, 2021
@lukicdarkoo lukicdarkoo added the test suite Start the test suite label Aug 4, 2021
@lukicdarkoo
lukicdarkoo marked this pull request as ready for review August 5, 2021 12:03
@lukicdarkoo
lukicdarkoo requested a review from a team August 5, 2021 12:03
@ad-daniel
ad-daniel requested review from ad-daniel and stefaniapedrazzi and removed request for stefaniapedrazzi August 5, 2021 12:25
@lukicdarkoo
lukicdarkoo marked this pull request as draft August 5, 2021 13:11
Comment thread src/webots/wren/WbCoordinateSystem.cpp Resolved
@lukicdarkoo
lukicdarkoo marked this pull request as ready for review August 5, 2021 13:35

@ad-daniel ad-daniel left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, only have one doubt.

By the way, it's unrelated to this PR but is there a reason why the shortcuts to change view skip alt + 3 and alt + 5? seems very counterintuitive.

Comment thread src/webots/nodes/WbViewpoint.cpp Resolved
@ad-daniel
ad-daniel self-requested a review August 5, 2021 15:44

@ad-daniel ad-daniel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you.

@lukicdarkoo

Copy link
Copy Markdown
Member Author

By the way, it's unrelated to this PR but is there a reason why the shortcuts to change view skip alt + 3 and alt + 5? seems very counterintuitive.

Agree, currently:

  • ALT+5: Move Viewpoint to Object
  • ALT+3: Seems to not be doing anything

@lukicdarkoo
lukicdarkoo merged commit e223e23 into feature-enu-plan Aug 6, 2021
@lukicdarkoo
lukicdarkoo deleted the feature-viewpoint-flu branch August 6, 2021 06:54
Viewpoint {
vrmlField SFFloat fieldOfView 0.785398 # (rad)
vrmlField SFRotation orientation 0 0 1 0
vrmlField SFRotation orientation -0.5773 0.5773 0.5773 2.0944

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That is not consistent with the documentation page.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This odd rotation value doesn't look very nice. Is it to make it oriented exactly as previously? Can't we afford a nicer rotation here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Is it to make it oriented exactly as previously?

No, I didn't like how it was before: x-east, y-up, and z-south (EUS). Now it is x-east, y-north, and z-up (ENU).

Can't we afford a nicer rotation here?

No. If we want to keep a nice default orientation we have to use this one. It is not an implementation workaround, but ENU (world) - FLU (camera) workaround.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As discussed, it might be better (although a bit arbitrary) to keep the 0 0 1 0 default orientation (as it is done in Gazebo and VRML97) to have the viewpoint from a human perspective rather than from a bird of prey perspective.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

And also this saves us from having long floating point values in the default orientation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But the nice default XY view from the top is also very convenient... So, let's keep it for now...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In any case, we should improve the documentation about the Viewpoint, as it seems quite unclear right now.

@omichel omichel modified the milestones: R2021c, R2022a Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test suite Start the test suite

Development

Successfully merging this pull request may close these issues.

3 participants