Coder Social home page Coder Social logo

Comments (8)

ugo-nama-kun avatar ugo-nama-kun commented on September 16, 2024 9

Hi,

The car body and dashboards are usually omitted in experiments in deep (vision) reinforcement learning papers by Schmidhuber's team and Deepmind team. That's why I removed them from the screen.

Anyway, you can recover the car body by modifying 280th line of grscreen.cpp

    for (i = 1; i < s->_ncars; i++) {
        grDrawCar(cars[i], curCar, dispCam->getDrawCurrent(), dispCam->getDrawDriver(), s->currentTime, dispCam);
    }

You should modify i =1 to i = 0. After the compile, you will be able to see the car body.
i=0 represent the first car, that is the agent. And other numbers are opponent cars.

For car mirrors, you should uncomment 361-366 lines in grscreen.cpp

    /* MIRROR */
  /*
    if (mirrorFlag && curCam->isMirrorAllowed ()) {
        mirrorCam->display ();
        glViewport (scrx, scry, scrw, scrh);
    }
  */

To show the map, tachometers etc. I remember that we should uncomment appropriate methods in 841-845 lines of cGrBoard::refreshBoard in grboard.cpp.

void cGrBoard::refreshBoard(tSituation *s, float Fps, int forceArcade, tCarElt *curr)
{
    if (arcadeFlag || forceArcade) {
        grDispArcade(curr, s);
    } else {
        //if (debugFlag) grDispDebug(Fps, curr);
        if (GFlag) grDispGGraph(curr);
        //if (boardFlag) grDispCarBoard(curr, s);
        //if (leaderFlag)   grDispLeaderBoard(curr, s);
        //if (counterFlag) grDispCounterBoard2(curr);
    }

    //trackMap->display(curr, s, Winx, Winy, Winw, Winh);
}

from gym_torcs.

arsenious avatar arsenious commented on September 16, 2024

Hi
Thanks @ugo-nama-kun and @yanpanlau for the wonderful codes and explanations. I have finished training and I'd like to record a video with some of the basic sensor readings like speedometer etc. Please could you give detailed instructions on how to compile after making the changes.

You should modify i =1 to i = 0. After the compile, you will be able to see the car body.
i=0 represent the first car, that is the agent. And other numbers are opponent cars.

I'm relatively new to linux and it was with great difficulty I got all these components to work. I don't want to break it . Everything is installed inside an Anaconda environment.

Thanks!

from gym_torcs.

smasoudn avatar smasoudn commented on September 16, 2024

@arsenious Check this: https://github.com/ugo-nama-kun/gym_torcs/tree/master/vtorcs-RL-color

from gym_torcs.

rahulsengupta avatar rahulsengupta commented on September 16, 2024

Thanks

from gym_torcs.

JungHY avatar JungHY commented on September 16, 2024

i changed i=1 to i=0 but how can i re-compile the cpp file?

i just did "make" at vtorcs-RL-color but it doesn't show car

from gym_torcs.

sunshineclt avatar sunshineclt commented on September 16, 2024

@JungHY
You need to

make
sudo make install
sudo make datainstall

from gym_torcs.

JungHY avatar JungHY commented on September 16, 2024

@sunshineclt
Thanks i'll try it

from gym_torcs.

Maxwell2017 avatar Maxwell2017 commented on September 16, 2024

Hi
Thanks @ugo-nama-kun and @yanpanlau for the wonderful codes and explanations. I have finished training and I'd like to record a video with some of the basic sensor readings like speedometer etc. Please could you give detailed instructions on how to compile after making the changes.

You should modify i =1 to i = 0. After the compile, you will be able to see the car body.
i=0 represent the first car, that is the agent. And other numbers are opponent cars.

I'm relatively new to linux and it was with great difficulty I got all these components to work. I don't want to break it . Everything is installed inside an Anaconda environment.

Thanks!

Do you reproduce the model which is close to the model given by the author?According to the modification suggestions given in other issues, I have been able to train the model, but the car does not run very well. The car often goes out of the track and cannot return to the track. Do you have any good suggestions?
@arsenious

from gym_torcs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.