Is the location setting correct on the Sedan car?

29 views
Skip to first unread message

ji li

unread,
Dec 1, 2022, 4:30:19 AM12/1/22
to ProjectChrono
Hello
       I‘m skeptical about the pose settings of the Sedan when I set the initRot(0.929, 0, 0,  -0.371) on demo_VEH_Sedan.cpp as shown in the first picture. I found that the rotation of the tires of the car also changes   as shown in the second picture.  However I do the same rotation setup on demo_VEH_UAZBUS.CPP and the tires are normal, we can see the third picture.  Is the result of the Sedan right?
 setup.png

Sedan.png

UAZBUS.png

Radu Serban

unread,
Dec 1, 2022, 5:01:25 PM12/1/22
to ProjectChrono

Thanks for reporting this.  It turned out to be a bug in the initialization of the rack-and-pinion steering mechanism. I pushed a fix for it in the ‘main’ branch of the Chrono repository.

 

--Radu

 

From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of ji li
Sent: Thursday, 1 December 2022 10:30
To: ProjectChrono <projec...@googlegroups.com>
Subject: [chrono] Is the location setting correct on the Sedan car?

 

Hello

       I‘m skeptical about the pose settings of the Sedan when I set the initRot(0.929, 0, 0,  -0.371) on demo_VEH_Sedan.cpp as shown in the first picture. I found that the rotation of the tires of the car also changes   as shown in the second picture.  However I do the same rotation setup on demo_VEH_UAZBUS.CPP and the tires are normal, we can see the third picture.  Is the result of the Sedan right?

 

 

 

--
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 on the web visit https://groups.google.com/d/msgid/projectchrono/532b856f-bff5-4520-8ee9-8c678950472bn%40googlegroups.com.

ji li

unread,
Dec 1, 2022, 10:57:58 PM12/1/22
to ProjectChrono
Hi Sedan 
         Thank you very much for your quick reply.  However I verified that the Debug still exiests, when I got pull  the ‘main’ branch of the Chrono.

在2022年12月2日星期五 UTC+8 06:01:25<Radu Serban> 写道:

Thanks for reporting this.  It turned out to be a bug in the initialization of the rack-and-pinion steering mechanism. I pushed a fix for it in  repository.

 

--Radu

Radu Serban

unread,
Dec 2, 2022, 4:23:08 AM12/2/22
to ProjectChrono

The current implementation is, granted, a bit fragile. But the issue is that your quaternion

ChQuaternion<> initRot(0.929, 0, 0, -0.371)

Is not quite unit-norm and as such does not represent a proper rotation.

 

Either:

  1. Normalize it before use, making a call
    initRot.Normalize(); or
  2. Use a function that generates a unit quaternion, for example
    ChQuaternion<> initRot = Q_Fron_AngZ(-45 * CH_C_DEG_TO_RAD);

 

Please verify that the code as you have it works fine if you provide a proper rotation quaternion (any of the above).

 

Then you can pull the latest code – I made a modification to the rack-and-pinion template implementation to make it more robust. That will also work with your not-quite-right quaternion.  But again, I strongly suggest you keep your input data consistent and accurate.

ji li

unread,
Dec 2, 2022, 10:13:13 AM12/2/22
to ProjectChrono
Hi Serdan
     Thank you very much for your explanation.  It's  all ok  when I use your ways. Thank you again.
    

Reply all
Reply to author
Forward
0 new messages