utiasdsl / lsy_drone_racing Goto Github PK
View Code? Open in Web Editor NEWAutonomous drone racing course repository from LSY
License: MIT License
Autonomous drone racing course repository from LSY
License: MIT License
Hi @amacati,
I tried to run train.py, the new script that you created for training an RL agent. However, it gives an error that says:
"File "examples/train.py", line 46, in main
env = create_race_env(config_path=config_path, gui=gui)
File "examples/train.py", line 39, in create_race_env
return DroneRacingWrapper(firmware_env, terminate_on_lap=True)
File "/home/tngrbz/drone_racing/lsy_drone_racing/lsy_drone_racing/wrapper.py", line 81, in init
n_gates = env.env.NUM_GATES
AttributeError: 'Quadrotor' object has no attribute 'NUM_GATES'"
It's weird because I switched the safe-control-gym repo to the "lsy_drone_racing" branch, which you suggested on Moodle, and I can see the place where the NUM_GATES is defined as well (in quadrotor.py line 346). Also, it was running well before switching to the dev. Here is the whole error prompt I get. I think I misconfigured something, but I couldn't really figure it out.
ErrorLog.txt
Hi @amacati ,
I struggle to understand the action space and action scaling in the DroneRacingWrapper. It says:
"All values are scaled to [-1, 1]. Transformed back, x, y, z values of 1 correspond to 5m." I don't know how to interpret this.
The action is rescaled for the firmware by 1,1,1,pi and added to the current drone position. Then passed to the full state command of the firmware wrapper. So my question is, why did we not rescale the x,y,z by 0.2 instead of 1?
Secondly, to this logic, I assume, the action that the model learns has to be transformed afterwards as well. So when we use the trained RL model in the sim.py or elsewhere, the action suggested by the trained model has to be transformed in the same sense (rescaling and adding to the current position), right? e.g. when we do:
action = model.predict(obs)
This action has to be transformed. I hope the question is clear
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.