btx0424 / OmniDrones

Home Page:https://omnidrones.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question about the "Deployment on Crazyflie 2.1" experiment

Gloriabhsfer opened this issue · comments

Hi,
Thank you for the nice work. I have noticed that your tutorial has a sim2real project that is trained with crazyfile 2.1. Because the crazy file(crazyswarm) is developed based on the gazebo, and you are training the rate controller. I wonder if I can use the gazebo as my test environment to test whether the trained rate controller is useful to a real drone. Firstly, I trained the track task with hummingbirds in your code, then obtained gazebo's drone state and packed them to tensordict. Then passed them to the trained network. But the result is not work and I have noticed that you mentioned you have done some domain randomization. It's very hard for me to follow the controller cause I don't know the specific unit and I don't know if I need to do some unit transform for gazebo data. Could you please tell me some details about this experiment if possible?
Thanks a lot.
Gloria

Sorry for the delayed reply.

I think domain randomization might not be the primary issue here. Could you check if the observation specifications are aligned? For example, the format of quaternion (xyzw or wxyz), the frame of velocities (body or world). Then our suggestion is to start with very simple tasks as sanity checks, for example, take off and hover.

Regarding the domain randomization part, check this config file for example usage.

Feel free to raise more questions if still encountering troubles.

Hi,

Could you please share more details about the interface you created to connect the trained policy to Crazyswarm2? I am trying to use cflib to interface with the policy but am encountering issues with a simple hovering task. Specifically, how are you sending the action commands to the Crazyflie? From the policy, do you get the rate value for each actuator, and how are you transforming that into a command used by Crazyswarm2?

Thanks.