ugo-nama-kun / gym_torcs

MIT License
408 stars 163 forks source link

Server state is getting another car's info in case of Quick Race. #22

Open futurecrew opened 7 years ago

futurecrew commented 7 years ago

Hi,

When i run snakeoil3_gym.py in Practice mode, it gets server state properly. (e.g. speedX, angle, tracPos). But when i run snakeoil3_gym.py in Quick Race mode, it gets another car's server state.

For example, if i select two cars (scr_server 1 and tita 3) in 'Selected' list in Quick Race configuration, then snakeoil3_gym.py gets speedX, tracPos of tita not of scr_server.

Do you have any idea of this problem? Thank you.

futurecrew commented 7 years ago

Somehow it works fine. I tried various things like,

Roblaboy commented 6 years ago

The third and fourth affected the issue~ But i have a question, how to select my own max speed?

ZhenZhuHuang commented 1 year ago

When I use 6 cars in Quick Race mode, i found the it always changed the focus car in the GUI. this is the quickrace.xml file. `

<attstr name="type" val="race"/>
<attstr name="starting order" val="drivers list"/>
<attstr name="display mode" val="normal"/>
<attstr name="display results" val="yes"/>
<attstr name="restart" val="yes"/>
<attnum name="laps" val="10"/>
<section name="Starting Grid">
  <attnum name="rows" val="2"/>
  <attnum name="distance to start" val="80"/>
  <attnum name="distance between columns" val="80"/>
  <attnum name="offset within a column" val="100"/>
  <attnum name="initial speed" val="0"/>
  <attnum name="initial height" val="0.2"/>
</section>

`