Adapt latest crazyflow - #139
Conversation
|
the deploy.py did not work, let me check |
2576e5d to
4fe8098
Compare
|
everything is working now |
ratheron
left a comment
There was a problem hiding this comment.
Thanks for updating to the latest Crazyflow version, which has some breaking changes.
Added some comments. We should also check the docs for the quat, since only the yaw from the quat is used in the control stack.
ratheron
left a comment
There was a problem hiding this comment.
Just one minor thing left for me to approve. Btw, don't we need to change any docs? Seems odd.
There was a problem hiding this comment.
In my opinion, the parameter thrust_max is always per motor, so we shouldn't overwrite it in the dict with 4x. Instead, just take it x4 where we write it into the thrust constraints, as it was before.
There was a problem hiding this comment.
yes make sense, but there is somewhere else in the code has ambiguity on total thrust_max and on thrust_max per motor, for example in the build_action_space(), I will suggest to change the variouble name to self.total_thrust_max there.
you mean the pr for docs? it haven't done yet, I will finish it tomorrow. Or what do you mean? |
I mean we change the crazyflow version which broke things. If we mention load_params somewhere in the docs, this also needs to be changed. If the docs never talk about this, it's fine |
I will check the docs, and should I change the variable names to fix the ambiguity in lsy_drone_racing/lsy_drone_racing/control/attitude_input.py Lines 41 to 42 in b1f5b36 |
Yeah, we can remove the ambiguity by saying sth like total_thrust_max |
I pinned the crazyflow to the latest commit in the pyproject.toml and reproduced the import error on my linux desktop.
commit 1:
now the param loader will be imported from the
crazyflow.dynamicsand takes in both dynamics model and the drone model. I also changed the signature ofbuild_action_space()to load dynamics.commit 2:
the params are no longer expand according the world number since learnsyslab/crazyflow#105, a few lines are added in race_core.py to enable it, solved the
incompativle shapes for broadcastingerror in testscommit 3:
adapt to the 16 dim of state action. Notice that in race_core.py:
the disturbance will be added slightly different as before, since it adds on xyzw now.
testing result: all pass on linux and macos, passed the deployment test