The OS shouldn’t make that much of a difference. There’s no reason to try this 
on Windows, if Linux is your primary OS.

Your modified code looks fine, which suggests the problem is with Irrlicht. 
Maybe you installed a debug Irrlicht library?

To enable run-time visualization (and interactive driving), you have two 
options:

  1.  Make sure you get a release build (optimized) Irrlicht library, or
  2.  Use the newer Chrono::VSG run-time visualization system.

Ideally, you would have both options available in your Chrono build (some demos 
use one, some the other, with a few allowing both).  VSG is a more modern 
graphics engine and quality is better. I strongly encourage you to test it out.

Installation instructions for Chrono::VSG are provided at: 
https://api.projectchrono.org/module_vsg_installation.html.  It is important to 
use the script-based approach to building the necessary VSG dependencies. So 
*not* use the “VSG framework” (compatibility issues).

--Radu

From: [email protected] <[email protected]> On Behalf 
Of Bean Young
Sent: Thursday, August 10, 2023 4:54 AM
To: ProjectChrono <[email protected]>
Subject: Re: [chrono] Re: why can't the vehicle in demo_VEH_WheeledJSON move?

Hi Radu,

I don't have any PC installed with Windows, so I couldn't verify it on Windows, 
maybe I can use a docker container with Ubuntu 20.04 and newer compiler for 
verification later.

My newest compile command is:
cmake -G"Unix Makefiles" -H/root/chrono -B/root/build_chrono -DBUILD_DEMOS=ON 
-DBUILD_BENCHMARKING=ON -DENABLE_MODULE_IRRLICHT=ON 
-DENABLE_MODULE_POSTPROCESS=ON -DENABLE_MODULE_VEHICLE=ON 
-DENABLE_MODULE_OPENGL=ON -DENABLE_MODULE_GPU=ON -DENABLE_MODULE_SYNCHRONO=ON 
-DCMAKE_BUILD_TYPE=Release --install-prefix=/usr/local/chrono
make -j4
make install

Now, I have removed all the code related to Irrlicht from 
demo_VEH_WheeledJSON.cpp, and I provide a constant throttle value (0.5) and 
print vehicle speed, simulation time and RTF to console in each iteration. In 
this case, the RTF was reduced from 50-70 to about 0.75, so I feel that 
Irrlicht cost a huge resource, but I don't know whether my modification is 
correct, the modified demo_VEH_WheeledJSON.cpp is in attachment.

Thanks for help!

在2023年8月9日星期三 UTC+8 19:01:03<Radu Serban> 写道:
Hi Bean,

While you may want to consider upgrading your Ubuntu distribution and GCC 
compiler, I don’t see any particular issues with your hardware or software.

I still suspect that you have not really built Chrono in Release mode.  You may 
want to do a fresh build and also enable CMAKE_VERBOSE_MAKEFILE so that you can 
check that the appropriate optimization flags are being used during the build 
process.

For reference, demo_VEH_WheeledJSON runs at an RTF of around 0.5 (so twice 
faster than real time) on my AMD Ryzen 7 3700X desktop and an Nvidia RTX 2060 
(Windows).  Even on my Surface 8 Pro with an Intel Core i7-1185GT and 
integrated graphics, I get an RTF of 0.9-1.1 for that demo.  By the way, the 
reported RTF does not include rendering;  an RTF 50-70 points to a non-release 
build (I get an RTF of around 55 with Debug code on my desktop).

--Radu



From: [email protected] <[email protected]> On Behalf Of Bean 
Young
Sent: Wednesday, August 9, 2023 9:09 AM
To: ProjectChrono <[email protected]>
Subject: Re: [chrono] Re: why can't the vehicle in demo_VEH_WheeledJSON move?

Hi Radu,

I had switched to main branch, and added -DCMAKE_BUILD_TYPE=Release to my cmake 
command, after compilation finished, then I ran demo_VEH_WheeledJSON again, but 
above problems still remain:

1. RTF (real time factor) is too large, about 50 - 70
2. frame rate is too low, it looks like Irrlicht doesn't use GPU for rendering, 
run nvidia-smi command, there is no demo process in output

My compiling and running env is as follows:

CPU: Intel(R) Xeon(R) Silver 4210R CPU @ 2.40GHz
GPU: Quadro RTX 4000
OS: Ubuntu 18.04 x86_64
cmake: 3.25.2
GCC & G++: 7.5.0

Is there any problem in my env or compilation process?

在2023年8月9日星期三 UTC+8 13:05:36<Radu Serban> 写道:
Bean,

You are actually not building in Release mode.  The default build type for 
CMake is the “empty” build type which does not use any optimization flags.
Add -DCMAKE_BUILD_TYPE=Release to your cmake command.

The delay you see in vehicle response is most likely due to processing and 
buffering of keyboard events combined with slow simulation (because the code 
was not built in release mode). Unless modified, that demo uses by default a 
HMMWV model and that vehicle is a bit more responsive than what you observe. 
Having said that, the proper way of testing vehicle performance (e.g., 
acceleration performance) is by setting driver inputs (throttle) 
programmatically and not interactively.  See for example demo_VEH_HMMWV_Accel.

Finally, unless you have a strong reason not to, I strongly suggest you 
checkout the ‘main’ branch of the Chrono repository.  We continuously push 
fixes and improvements to the code and many of those occurred since the 8.0 
release. Working with the current development code also makes it easier for 
people to test and check issues users report (few will keep around a clone of 
the released version).

--Radu

From: [email protected] <[email protected]> On Behalf Of Bean 
Young
Sent: Wednesday, August 9, 2023 4:26 AM
To: ProjectChrono <[email protected]>
Subject: Re: [chrono] Re: why can't the vehicle in demo_VEH_WheeledJSON move?

Hi Dan,

I ran demo_VEH_WheeledJSON on my workstation with 20-core cpu (@2.40 Hz) and 32 
GB RAM, and built the code in release mode, but this demo and others are 
running very slowly, and the frame rate is very slow, I don't know what went 
wrong. The compile command I used, is as follows:

cmake -G"Unix Makefiles" -H/root/chrono -B/root/build_chrono 
-DENABLE_MODULE_IRRLICHT=ON -DENABLE_MODULE_POSTPROCESS=ON 
-DENABLE_MODULE_VEHICLE=ON -DENABLE_MODULE_OPENGL=ON -DENABLE_MODULE_GPU=ON 
--install-prefix=/usr/local/chrono
make -j4
make install
在2023年8月9日星期三 UTC+8 09:53:24<Dan Negrut> 写道:
Bean - I think it’s relatively reasonable to expect a vehicle to take 2 seconds 
to reach 5.15 m/s. That’s 18.5 km/h – this value depends on the mass of the 
vehicle and engine used (HMMWV, it seems). This vehicle simulation should be 
real time, unless you have an old laptop or so. Also, make sure you built the 
code in release mode, not debug mode.
Dan
---------------------------------------------
Bernard A. and Frances M. Weideman Professor
NVIDIA CUDA Fellow
Department of Mechanical Engineering
Department of Computer Science
University of Wisconsin - Madison
4150ME, 1513 University Avenue
Madison, WI 53706-1572
608 772 0914<tel:(608)%20772-0914>
http://sbel.wisc.edu/
http://projectchrono.org/
---------------------------------------------

From: [email protected] <[email protected]> On Behalf Of Bean 
Young
Sent: Tuesday, August 8, 2023 8:45 PM
To: ProjectChrono <[email protected]>
Subject: [chrono] Re: why can't the vehicle in demo_VEH_WheeledJSON move?

Hello!

Yes, you are absolutely right!
After I held down the W key for 2 seconds (in simulation time), I could see the 
vehicle get moving at 5.15 m/s:

[Image removed by sender. Image removed by sender. Image removed by sender.]

But 2 seconds of simulation time takes too long in real-world, and how can I 
make demo_VEH_WheeledJSON run in real time mode?
Thankds for help!
在2023年8月8日星期二 UTC+8 20:45:28<[email protected]> 写道:
Hello!
Can you please try pressing the throttle for longer and seeing if the vehicle 
still does not move? It is normal that there is a lag between the application 
of the throttle and the movement of the vehicle. This can be due to two reasons
1) The torque converter slips (seen as Tconv slip). In the screenshot you can 
also see the T conv out RPM is only 10 and so it is expected that the vehicle 
does not move forward. This is similar to a vehicle in real life, even if you 
slam the throttle there will be a finite lag before the vehicle starts moving.
2) This lag might seem longer than usual because your simulation might not be 
running at Real Time. This means that even though you feel that you have been 
pressing the keyboard key for a long time, in simulation time, it is too low 
(and still within the lag period). From my experience, pressing the key for 
about 1 second simulation time is enough to get the vehicle moving.
If you still face issues after pressing the key for longer, then there might be 
some problem and we can try looking at it together :)

Best
Huzaifa

On Tuesday, August 8, 2023 at 4:46:03 AM UTC-5 [email protected] wrote:
I have built Chrono 7.0.3 and 8.0.0 in Ubuntu 18.04, when I ran 
demo_VEH_WheeledJSON, I pressed A key on the keybord, I could see the throttle 
was increasing, but the vehicle was not moving and the speed was no change, the 
screenshot is as follows:

[Image removed by sender. Image removed by sender. Image removed by sender.]
Can someone help me explain this problem?
--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/dccb3b76-e564-4a58-9772-316a97cb5c74n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/dccb3b76-e564-4a58-9772-316a97cb5c74n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/14f18ff1-90f8-401d-a861-2f1a802136cbn%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/14f18ff1-90f8-401d-a861-2f1a802136cbn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/04455699-eb82-4c4b-a438-06d84fcb9e99n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/04455699-eb82-4c4b-a438-06d84fcb9e99n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/228e7783-56a1-48ec-ac12-a21d21bd6500n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/228e7783-56a1-48ec-ac12-a21d21bd6500n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/PH0PR06MB8237857D1DCB89C76BE4EE75A713A%40PH0PR06MB8237.namprd06.prod.outlook.com.

Reply via email to