[Dynamics] Drone dynamics#83
Conversation
matteobettini
left a comment
There was a problem hiding this comment.
Very very cool, here a first round of comments
Co-authored-by: Matteo Bettini <55539777+matteobettini@users.noreply.github.com>
1. the mass is obtained from self.agent.mass now 2. Updated how the drone_state is initialized
matteobettini
left a comment
There was a problem hiding this comment.
LGTM.
Did you format it already?
As we discussed it would be useful to have a function needs_resetting that returns a boolean tensor of shape n_envs telling if the drone is in an unrecoverable state for each env
We should have a debug scenario for this (like for diff drive) where users can test it.
Maybe this will need a simple controller layer.
|
I will add needs_resetting. Speaking of the debugging scenario, I also want to manually fly the drone with the raw control inputs [thrust, torque_x, torque_y, torque_z]. Then, I can provide an LQR controller for debugging, where a user inputs forces. Is the following code a good place to start? |
Yes, executting a scenario with a drone and that will let you control the first 3 actions (action one with left/right, action 2 with up/down, action 3 with m/n). (This buttons will do -/+ max_range whioch you set upon agent construction) In your case you have 4 actions so we might need a workaround for that. Regarding the controller, look at We can decide if we want the input of this to be forces and torque or velocities. |
The dynamics require testing. Flying this manually is challenging because the action contains [Total_thurst, Torque_x, Torque_y, Torque_z]. I will code a separate LQR controller (as a heuristic controller) for testing.