Set UpVector as -Z

68 views
Skip to first unread message

Giri Mugundan

unread,
Nov 11, 2024, 10:15:02 PM11/11/24
to ProjectChrono
Hello,

I am trying to simulate an NED frame. If I were to override the hard coded values for Z or Y as the "upvector" where do I need to make the changes?

Please help me out. Thank you.

Sincerely,
Giri

Radu Serban

unread,
Nov 29, 2024, 8:04:10 AM11/29/24
to ProjectChrono

Hi Giri,

 

Please provide more details on what it is that you are trying to do and what “hardcoded” values for the Y and Z axes you are talking about (is that in the physics simulation, in the runtime visualization, or something else?)

As far as I can tell, you want is to have the gravity acting along the “Down” direction of a NED frame. In that case you will want to set the Chrono value of the gravitational acceleration (always assumed to be fixed in the absolute frame) to zero and include gravity forces using a custom force loader (as gravity will change direction relative to the absolute, ECEF frame).

 

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/projectchrono/0af82d41-b21a-4a1a-ade6-dc90a1dbee2bn%40googlegroups.com.

Giri Mugundan

unread,
Dec 26, 2024, 10:44:17 AM12/26/24
to ProjectChrono
Hello Dr.Radu,

I was trying to have the NED frame simulated in  the visualization. I have set the gravity vector as (0.0,0.0,-9.8) as I need it to be.


 I figured out how to set the visualization the way I wanted it to be. I am sorry I wasn't as clear before. Here are the changes I made to have the visualization flip around the way I wanted it to be.

In line 525 of ChIrrCamera.cpp:
rotX = (f32)vec2d.getAngle() + (f32)180; // --> Added 180deg in X-rotation to flip the camera from Z up to -Z up
and this worked out for me.

Thank you for your help.

Sincerely,
Giri
Reply all
Reply to author
Forward
0 new messages