View Cameras

Development related to the GMAT core and GUI

View Cameras

Postby didle » Tue Jun 16, 2009 10:18 pm

Dear GMAT Team -

Phil is making progress with the OpenGL trajectory plot view. We are discussing options for mouse control of a camera, and details such as whether we should be rotating the entire view around the center of the current planet, or rotating the camera and moving it through the 3D environment. I think we will want both options in our future capabilities.

What other capabilities do we want for cameras?

I think we want most of the following -

1) 6DOF camera control in several reference frames
2) Zoom FOV control independent of camera X-axis translation
3) Cameras defined for the following reference frames:
a) ECI
b) Spacecraft Body
c) LVLH
d) Tracking (object to object and ground site to object)
e) Other
4) Sets of multiple cameras defined for each spacecraft
5) Toggle between cameras and between spacecraft (either from keyboard or GUI panel or both)
6) Spline trajectory for both position and orientation through waypoints in various reference frames
7) Output camera views as screen grab stills and movie files
8) Save camera settings as input file. Maybe part of script file?

Any suggestions, additions, comments?

Dunn
didle
 
Posts: 59
Joined: Wed Jan 14, 2009 5:05 pm

Re: View Cameras

Postby didle » Tue Jun 16, 2009 10:30 pm

Dear GMAT Team,

I came up with a complex 6DOF paradigm for controlling a view camera with the mouse. I sent it out via e-mail to some of the team last week. Here is is again, for the GMAT Forums. This was originally addressed to Phil S., at Schafer, hoping he could write new GMAT code to implement it.

OK, I've been thinking a great deal more about 6DOF mouse manipulation of the GMAT view and it's obvious that multiple schemes plus the ability for the user to custom define schemes is extremely desirable. We probably want all that controlled from a wxWidgets panel.

Meanwhile, for short term experimentation, I present a scheme below which I think would be good to make available for all users. I am humbly submitting the following dissertation as a GMAT team suggestion, but would like to point out that I've had NASA shuttle prox-ops training, RMS training, and have been flying 6DOF prox-ops with keyboard and joystick commands for ten years with multiple simulations including Odyssey. This scheme is based on a common 6DOF paradigm used by NASA astronauts for three things.

1) Flying the Space Shuttle in 6DOF prox-ops mode
2) Flying the Manned Maneuvering Unit (legacy system) in 6DOF prox-ops mode
3) Flying all the robot manipulator arms on shuttle and space station

This is how the two 3-axis joysticks for Odyssey are set up as well, and it actually parallels fighter aircraft which have a stick in the pilot's right hand and throttle in the left hand. Using it as a stick and throttle paradigm also links it closely to most simulation video games.

The first and most fundamental part of the paradigm is rotation is controlled by the right interface, and translation is controlled by the left interface.

For right side interface we can have three more specific names -

1) Rotational Hand Controller (RHC)
2) Joystick or Aircraft Stick
3) Right Mouse Button

For left side interface we can have three more specific names -

1) Translational Hand Controller (THC)
2) Throttle
3) Left Mouse Button

Note that RHC and THC are Shuttle and Remote Manipulator System (RMS) acronyms going back the length of the shuttle program, and thus are rich in NASA tradition.

For flying the shuttle or the RMS, the RHC looks and acts like an aircraft stick. It is mounted "vertically" and aligned with the spacecraft/camera body Z-axis. Push it right and you get roll right. Left and you get roll left. Push it forward and you get pitch down. Pull it back and you get pitch up. Twist it and you get yaw about the Z-axis in the same direction you twist. For the MMU, instead of a stick, the RHC is a cross on a post. The post is aligned with the body X-axis, or the direction the astronaut is facing. It operates in "wheelbarrow" mode. Push it right, and the MMU turns left. Push it left and the MMU turns right. Push it up and the MMU pitches down. Push it down and the MMU pitches up. You can think of this as trackball mode as well. You can also, for camera operations, think of this as holding the handle of a big TV camera mounted on a tripod. For roll on the MMU, you twist the cross in the direction you want to roll. Since the post around which the cross is twisting is aligned with body-X, roll is about X which makes sense.

For flying the shuttle or the RMS, the THC in your left hand is a box on a post. The post, like the MMU post, is aligned with the body-X direction. The MMU THC works exactly the same way, except instead of a box on a post it's a cross on a post. Push the box right to translate right. Left to translate left. Up to translate up. Down to translate down. Push the box forward for forward and pull the box back to fly backwards. The body axes are the AIAA standard body axes. For zero Euler Angles wrt the LVLH frame, they are aligned with the LVLH axes. So positive X is forward. Negative X is backward. Positve Y is to the right. Negative Y to the left. Positive Z is down or nadir. Negative Z is up or Zenith.

With that as background, here is my proposal for the NASA Astronaut / Proximity Operations / LVLH mode for controlling cameras with a mouse.

The right button is the rotational controller. It works in trackball or camera on tripod mode. Drag right button right, pan left. Drag right button left, pan right. Drag right button up, pitch down. Drag right button down, pitch up. This mode is not rotating the view around the center of the model, but rotating the camera around its own center. Push the mouse center wheel down and drag up and down for roll. Mouse wheel drag down for roll right and drag up for roll left. Think of this as putting the cursor on the right side of the view and dragging the view to pivot around the center of the screen. Gene has this implemented already in Odyssey.

The left button is the translational controller. Left button drag right, the view moves right, so this is really controlling camera translation left. Left button drag left, view moves left. Left button drag up, the view moves up. Left button drag down, the view moves down. Roll the mouse center wheel forward for translate (not zoom) in, and roll the mouse center wheel backward for translate backward (not zoom out). Translating forward and backward is +X and -X in camera body coordinates respectively.

This brings up the need to control zoom now that we are in a perspective projection environment. Any ideas for zoom control? Maybe shift mousewheel roll forward for zoom in and shift mousewheel roll backward for zoom out? I've got the "i" and "o" keys in Odyssey activated for Zoom In and Zoom Out respectively. That's pretty efficient since the two keys are next to each other.

So, Phil, can you hard wire this mouse camera control option and send me a separate executable for me to test? Instead of a separate GMAT code branch, you could just have a hard wired switch statement in your current branch, and send me the executable with the switch set to the new mode. Anyone else want to try that mode? With true 6DOF I should be able to fly right through the spacecraft model and look at its nadir facing side. Right now in Phil's current new (10 June 2009) GMAT mode, if I go to the other side of the model, I have to rotate the planet model until the spacecraft is on the far side. Then there is a translation constraint that won't let me fly through the planet. Maybe it's FOV zoom instead of translation and there is a limit to how far in we can zoom?

Dunn
didle
 
Posts: 59
Joined: Wed Jan 14, 2009 5:05 pm

Re: View Cameras

Postby pjsilvia » Wed Jun 17, 2009 2:27 pm

There's a few camera control modes in my version of GMAT, now, including one Dunn requested using the mouse and using the left and right mouse buttons to simulate the left and right joysticks on an aircraft. To access it while running my executable, hit Shift+Z. I would recommend doing it at the beginning of the run and not swapping mid-run with further pushes of Z since that can lead to some strange results. Here's the control synopsis:

Left-Click and Drag: Translate left, right, up, down
Right-Click and Drag: Rotate left, right, up, down (Yaw/Pan left/right, Pitch up/down)
Middle-Click and Drag up and down: Roll
Mouse Wheel Up: Translate forward
Mouse Wheel Down: Translate backward
Shift+Mouse Wheel Up: Zoom in
Shift+Mouse Wheel Down: Zoom out

Enjoy!
pjsilvia
 
Posts: 4
Joined: Thu Jun 11, 2009 8:38 pm

Re: View Cameras

Postby space_egd » Thu Jun 18, 2009 10:08 pm

Below are the control schemes for two mission analysis software tools I use often that provide similar 3d visualizations as GMAT. I'm not proposing using a scheme like theirs but simply posting for reference. The mouse click combinations that were not listed for a particular tool have no effect.

=========================
Satellite Tool Kit (STK)
=========================
Left-Click
  • Left-Click and Drag: Rotate camera about focus point.
    Moving in up direction sends camera up and over the focus point while still keeping the focus point in view and moving in the down direction is the inverse of that. (i.e. For a Foosball table whose pivot point is about the player's hip restricting it's movements to spin towards or away from you. Imagine the Foosball player figure is upright with his face facing you. Now place your finger on top of his head and move his head either towards you or away from you. This is the motion simulated by this tool.)
    Moving in left or right direction causes camera to move to left and right around focus point. (i.e. For a globe of the Earth you may have in your home that can only be rotate fixed about the north-south pole line. Place your hand on the globe and move your hand to left or right. This is the motion simulated by this tool.)
    Moving the mouse diagonally combines the rotation of up/down and left/right. Even when the north/south pole might be facing towards you the up/down and left/right movements above still result in the same motion of the globe.
  • Ctrl+Left-Click and Drag: Rotate camera about focus point but restrict to only up and down movements
  • Alt+Left-Click and Drag: Rotate camera about focus point but restrict to only left and right movements
  • Shift+Left-Click and Drag: Rotate camera about the camera's center and move camera focus point to new view
  • Ctrl+Shift+Left-Click and Drag: Rotate camera about the camera's center and move camera focus point to new view but restrict to left and right movements
  • Alt+Shift+Left-Click and Drag: Rotate camera about the camera's center and move camera focus point to new view but restrict to up and down movements
Middle-Click
  • Middle-Click and Drag up and down: Move camera backward (away from screen)and forward (toward screen)

Right-Click
  • Right-Click and Drag up and down: Move camera backward (away from screen)and forward (toward screen). Increase or decrease camera's distance to focus point.
  • Ctrl+Right Click: Reset camera to original focus point

Misc
  • Double Left click or Double Right click on Celestial Object (i.e. Earth): Display lat long at location clicked and keep text on screen

===============
FreeFlyer
===============
Left-Click
  • Left-Click and Drag: Rotate camera about focus point.
    Moving in up direction sends camera up and over the focus point while still keeping the focus point in view and moving in the down direction is the inverse of that. (i.e. For a Foosball table whose pivot point is about the player's hip restricting it's movements to spin towards or away from you. Imagine the Foosball player figure is upright with his face facing you. Now place your finger on top of his head and move his head either towards you or away from you. This is the motion simulated by this tool.)
    Moving in left or right direction causes camera to move to left and right around focus point. (i.e. For a globe of the Earth you may have in your home that can only be rotate fixed about the north-south pole line. Place your hand on the globe and move your hand to left or right. This is the motion simulated by this tool.)
    Moving the mouse diagonally combines the rotation of up/down and left/right. Even when the north/south pole might be facing towards you the up/down and left/right movements above still result in the same motion of the globe.

Middle-Click
No functionality

Right-Click
  • Right-Click and Drag up and down: Move camera backward (away from screen)and forward (toward screen). Increase or decrease camera's distance to focus point.
Last edited by space_egd on Thu Jun 18, 2009 10:38 pm, edited 2 times in total.
Reason: changed formatting and added additional details
space_egd
 
Posts: 357
Joined: Sun Jun 08, 2008 9:02 pm
Location: MD

Re: View Cameras

Postby space_egd » Thu Jun 18, 2009 10:49 pm

pjsilvia wrote:There's a few camera control modes in my version of GMAT, now, including one Dunn requested using the mouse and using the left and right mouse buttons to simulate the left and right joysticks on an aircraft. To access it while running my executable, hit Shift+Z. I would recommend doing it at the beginning of the run and not swapping mid-run with further pushes of Z since that can lead to some strange results. Here's the control synopsis:

Left-Click and Drag: Translate left, right, up, down
Right-Click and Drag: Rotate left, right, up, down (Yaw/Pan left/right, Pitch up/down)
Middle-Click and Drag up and down: Roll
Mouse Wheel Up: Translate forward
Mouse Wheel Down: Translate backward
Shift+Mouse Wheel Up: Zoom in
Shift+Mouse Wheel Down: Zoom out

Enjoy!


The concern I have with this control scheme as a default in GMAT is that it doesn't involve focusing on an object or focus point. As Dunn mentioned this control scheme follows a scheme that would be like flying a spacecraft freely in space as if you were controlling that spacecraft with a joystick. When using tools like GMAT, STK, or FreeFlyer, I'm typically concerned about looking at some sort of point of focus. Earth, Mars, Moon, Spacecraft. The scheme above doesn't incorporate in a way I'm understanding it an ability to lock onto a target/point and rotate about it.

Being able to free fly through the stars would be really cool but in my work I would rarely use an ability like that.

I'll attempt to also come up with a possible control scheme but I'm not sure when I can do that.
space_egd
 
Posts: 357
Joined: Sun Jun 08, 2008 9:02 pm
Location: MD

Re: View Cameras

Postby space_egd » Thu Jun 18, 2009 11:11 pm

I seemed to have missed the use of the Z button to toggle through different camera control modes. Below is an excerpt from a post by pjsilvia containing the other controls:

pjsilvia wrote:Here's a summary of controls:

Keyboard
- W key: Translate forward
- S key: Translate backward
- A key: Translate left
- D key: Translate right
- Z key: Switch between centered and free-flying viewing mode. In centered viewing mode, when you rotate you rotate the camera around the center point.
In free-flying mode, you rotate the view in place. With translation, this allows you to fly freely around the scene. The program begins in centered
by default.
- P key: Swaps between orthogonal and perspective-correct projection. Starts in orthogonal by default.

Mouse
- Left-Click and Drag: Rotates the camera, either around a center point or in place depending on the viewing mode (see Z key above)
- Shift+Left-Click and Drag: Translate the camera left, right, up, and down
- Right-Click and Drag: Zoom in and out. Only effective in perspective-correct projection
- Shift+Right-Click and Drag: Translate forward and back. It has no visible effect in orthogonal projection, but does move the view center, so use with caution.
- Middle-Click and Drag (I mean the hold the mouse wheel down and drag): Change the yaw

The zoom/translate forward/backward in orthogonal mode will need to be fixed if we intend to keep orthogonal projection in the program. As stated previously, I have a form of zoom that orthogonal mode can use, but it wound up being too confusing if you switch between orthogonal and perspective mode while it was used. Also, switching between the two viewing modes with 'Z' can be a little confusing. Again, this would theoretically not be an issue in the release since they wouldn't be hot-swapping modes like we can here.

Let me know what you think!

~Phillip "Rabbi" Silvia, Jr.
Soli Deo Gloria
pjsilvia@schaferalb.com


Some of my comments from the previous post can be ignored but I'm still going to need to think about how all of these controls are going to work and come up a detailed summary of what I think about the current control scheme.
Last edited by space_egd on Thu Jun 18, 2009 11:18 pm, edited 1 time in total.
Reason: added additional comments
space_egd
 
Posts: 357
Joined: Sun Jun 08, 2008 9:02 pm
Location: MD

Re: View Cameras

Postby didle » Thu Jun 24, 2010 9:38 pm

Edwin,

Long time between posts. Steve now has an executable with all the functionality mentioned above. There is even a nice User Manual for adding Enhanced3DView to what was the "Subscribers" folder and is now the "Outputs" folder. The new camera mode comes up with a default Centered View mode. This lets you pivot around the earth. We could discuss how to hop from object to object to have each object become the center.

Then all the Astronaut 6DOF stuff that I like for controlling cameras, so I can move to the other side of an object and look at it from that side, or roll upside down if I want, is available through shift-Z. Let us know if there's anything you'd like to add.

Dunn
didle
 
Posts: 59
Joined: Wed Jan 14, 2009 5:05 pm

Re: View Cameras

Postby TammyMWheeler » Sat Jan 19, 2019 7:04 pm

Core development of the camera is too much difficult and a lot of people face many issues to make it. I am glad to be apart of this discussion to learn from here also I learn from assignment writing help australia to be experienced in my skills.
TammyMWheeler
 
Posts: 1
Joined: Sat Jan 19, 2019 6:53 pm

Re: View Cameras

Postby bigumahe » Mon Feb 11, 2019 7:40 am

Camera we all know that is the need of the present age and there is improvement in its lens day by day. So this is said that write essay for me and you will come to know many essential thoughts about it.
bigumahe
 
Posts: 1
Joined: Mon Feb 11, 2019 7:40 am


Return to Core Development

Who is online

Users browsing this forum: No registered users and 3 guests

cron