-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inverse Reinforcement Learning #57
Comments
Hello @farbod1277, To modify For that, I'd start from script gym-pybullet-drones/examples/fly.py Lines 152 to 158 in ed9aaa5
|
Hi @JacopoPan , Thank you very much for your response. Yes I was thinking of using an xbox controller or arrow keys to fly the drone manually using the PID controller and save those as my expert trajectories, then use imitation learning. Would that be at all possible with this setup? I would need to write the pipeline to interface the simulator with a controller somehow. Any ideas? Thanks again!! |
In gym-pybullet-drones/examples/fly.py Lines 68 to 69 in ed9aaa5
I'd proceed by steps, (i) first write a separate program that translates your controller inputs into such format, (ii) plug these new trajectories in |
Thanks again @JacopoPan. How about if I wanted to control the drone directly with attitude and thrust control instead of way-points? |
gym-pybullet-drones/examples/fly.py Line 153 in ed9aaa5
which simply wraps around ComputeControl
gym-pybullet-drones/gym_pybullet_drones/control/BaseControl.py Lines 87 to 96 in ed9aaa5
ComputeControl computes thrust and desired roll/pitch/yaw from the waypoint (using the position control method) and feeds those into the attitude control to obtain the desired motor RPMsgym-pybullet-drones/gym_pybullet_drones/control/DSLPIDControl.py Lines 119 to 134 in ed9aaa5
I suppose you'd want to talk directly to this latter method. |
@JacopoPan thanks again! Just wondering, if I was to control the drone using positional control using What I'm thinking of doing right now is to retrieve the aforementioned variables from inside of |
I never tried this but it potentially makes sense to me. |
I tried it and I've got the following issue:
The control works fine when the drone is not required to do any rotations, i.e. going straight up. As soon as it is required to rotate to move in the x and y axis I get the following error in |
I fixed it by adding a scaling factor for the thrust and the torques after realising that their scales and clamps are completely different to what |
I see, I think it can make sense. If you run a few tests and eventually want to create a PR for your modified |
Hi,
Firstly, thanks for putting together such an awesome project!
I've been playing around with the
singleagent.py
problems recently and was wondering if there is any way to incorporate demonstration learning / inverse reinforcement learning into these tasks. Instead of hard-coding the reward functions in_computeReward
, I wanted to try learning a reward function from expert demonstrations. (See: Let's do IRL). I'd appreciate if you could give me some pointers on how to modify the_computeReward
and the learning process to include anIRL_reward
.Cheers
The text was updated successfully, but these errors were encountered: