Comments (7)
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.
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.
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.
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.
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.
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.
@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)
- Unable to use RL algorithms with continuous action space HOT 5
- Increasing number of steps per episode/ iteration HOT 3
- Multiprocess pickle Problem HOT 3
- How to set the spectator on the agent HOT 1
- Does macad-gym support multi-agent algos training? HOT 2
- Also stuck in env.reset() in example HOT 3
- How to create communicating environment?
- How to visualize the learning environment? HOT 2
- Support the library HOT 3
- `multi_view_render` will pop new display window on each frame with latest version of Pygame HOT 6
- The latest pull request is incomplete HOT 3
- gym version will affect the usage of ray[rllib] HOT 2
- PathTracker generate wrong route HOT 2
- when I use urban_signal_intersection_3c env ,happen error,please help me HOT 8
- How to customize a learning environment? HOT 2
- How do we port an existing multi-agent leanring algorithm such as IDDPG, IPPO? HOT 4
- Communication Mechanism
- v0.1.3 carla serve can't get connection HOT 1
- Implement of IMPALA Agent Examples HOT 2
- No support for other sensors? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from macad-gym.