rubis-lab / CPSim_linux

8 stars 26 forks source link

Calculating lab time has bug. #7

Open Kedia94 opened 7 years ago

Kedia94 commented 7 years ago

In the score board of torcs, lab time is 01:16:94, while score.txt said it is 5.78000 sec. Reason of this is simulator reads time from lab_time.txt and it thinks race is finished when there is same variable, but simulator can writes same variable while race is processing.

Below is my lap_time.txt and distance.txt


lap_time.txt                distance.txt                Problem
Skip...                 Skip...
17.500000 4.890000          17.500000 -0.143518
17.600036 4.992000          17.600036 -0.082590
17.700063 5.084000          17.700063 -0.019657
17.800000 5.192000          17.800000 0.057158
17.900047 5.278000          17.900047 0.111034
18.000070 5.374000          18.000070 0.164570
18.397092 5.780000          18.397092 0.195379          START
18.397130 5.780000          18.397130 0.195379          ...
18.397157 5.780000          18.397157 0.195379          ...
18.400000 5.780000          18.400000 0.195379          END
18.500000 5.872000          18.500000 0.175303
18.600156 5.992000          18.600156 0.140799
18.700000 6.084000          18.700000 0.115482
18.800077 6.192000          18.800077 0.082829
Skip...                 Skip...

Therefore I think fixing real-time_simulator_basic.cpp is needed:

NOTE: I'm using VMWare 12 Player and Ubuntu 14.04. This problem might be happened because of VM.

we123456 commented 7 years ago

Thanks for your reporting. The value of the first column of all log files should increase by 0.1 at the normal operation. Could you run this project at the native Ubuntu, and report again whether this issue occurs or not?