Coder Social home page Coder Social logo

Comments (7)

YuffieHuang avatar YuffieHuang commented on June 1, 2024 1

Hello. @praveen-palanisamy
Sorry, I'm really busy with another project these days and I haven't got a chance to try your suggestions. Please allow me a few more days and I will let you know the result. Thank you so much for your help!

from macad-gym.

praveen-palanisamy avatar praveen-palanisamy commented on June 1, 2024

Hi @YuffieHuang ,
Apologies for the delayed response. I somehow missed this. Good to know about your research direction!

You control an Actor/vehicle using your keyboard if you specify "manual_control": True for the Actor/Vehicle you want to control in the config.
For example, if you wanted to control the car1 actor in the "HomoNcomIndePOIntrxMASS3CTWN3-v0" environment, you would change the following line:


to:
"manual_control": True,

Note that the the above environment ("HomoNcomIndePOIntrxMASS3CTWN3-v0") uses the SSUI3C_TOWN3 scenario as per this configuration line:

If you wanted to use a different scenario, you should that config line as well. For example, you can change it to DEFAULT_SCENARIO_TOWN1_COMBINED_WITH_MANUAL.

As an additional note, when you are researching/experimenting with a new scenario with different configuration, it is better to create a new environment so that you can tweak the number and types of actors in the scenario among other things. You can easily create new environments following this guide: https://github.com/praveen-palanisamy/macad-gym/wiki/creating-new-learning-environments.md
Let me know if you need further help.

from macad-gym.

praveen-palanisamy avatar praveen-palanisamy commented on June 1, 2024

Hey @YuffieHuang ,
Just following-up to see if you were able to accomplish your goal. Were able to have mixed-autonomy scenarios with manual control enabled?

from macad-gym.

YuffieHuang avatar YuffieHuang commented on June 1, 2024

Hi @praveen-palanisamy,
I have tried the methods you mentioned. Sadly, it doesn't work for me. The camera, which is attached to the manually driven vehicle, disappears in the Pygame window. I tried to hit the keys "w", "a", "s", "d", or "up", "down", "left", "right". The car doesn't move in the CarlaUE4 window.

from macad-gym.

praveen-palanisamy avatar praveen-palanisamy commented on June 1, 2024

Hey @YuffieHuang ,
Could you post the environment settings you are using so that I can reproduce the issue?
You can also open a draft PR from a branch on your clone for us to debug.

from macad-gym.

praveen-palanisamy avatar praveen-palanisamy commented on June 1, 2024

Once you set "manual_control": True, you should be able to manually control the actor but you will need to have a client script that listens to your keyboard event and sends those as control commands to the actor. A default keyboard event handler (using PyGame) and a vehicle controller is provided as part of the base environment implementation which you can customize.

from macad-gym.

praveen-palanisamy avatar praveen-palanisamy commented on June 1, 2024

@YuffieHuang: Converting this thread to a Q&A Discussion and I'll wait for your draft PR to debug it.

from macad-gym.

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.