Crazyflie joint control not behaving as expected

Hello everyone,
I have been trying to control the Crazyflie model that comes with IsaacSim, using the same logic that can be found in this tutorial, however I can’t seem to make the propellers turn, and I am not even sure if the generated thrust is “pre-built” into the model. A few weird things that are happening and that may be help figuring this out are:

  1. When I hit “Play” the drone jumps to the air and stays at Z=0.015 (probably worth mentioning I am using the default grid environment);
  2. I tried importing the Ingenuity UAV and it moves on it’s own in an erratic way.
    I will be answering any questions to try to figure this out.
    Best regards,
    Diogo.

hello!

Great question! You are right though, the Crazyflie does not generate its own thrust :) But this is true for all robots in Isaac Sim currently, so the behavior is expected.

The individual robot assets we provide defines things like joint constraints, geometry, materials, etc… specifically among these is the Articulation, which defines a collection of joints to be manipulated “as a group”. Robot motion is defined by a controller: a program that converts commands like “fly this way” or “move the end effector to here” into a tensor of joint drive targets. The Articulation helps manage application of those targets to the proper drives in the sim.

To use the Crazyflie within Isaac Sim 2022.2.1 you will need to write a controller that calculates the appropriate thrusts needed to direct the drone with a given linear and angular velocity, and then apply those to the robot in the pre physics step of the sim. This controller would then also need to convert these thrusts into velocity targets for the propellers and return the ArticulationAction needed for the drone.

Lucky for you, some of this has already been done for the Crazyflie! It’s just not in “Isaac Sim” proper. You can check it out here OmniIsaacGymEnvs/crazyflie.py at main · NVIDIA-Omniverse/OmniIsaacGymEnvs · GitHub

That is an RL task for training a crazyflie flight controller. the _pre_physics_step contains the math you’re looking for here (though it is approximate. I would not use this for a truly physically accurate sim out of the box)

This aside, for your specific questions…

  1. What do you mean by “default grid environment”? What actions do you perform from a new stage? If I start from empty, I can then go create → physics → physics scene, create → physics → ground plane, and then import the drone by dragging it from the content browser to the viewport. If i position the drone above the plane and hit play, it falls as expected. Do you see this as well?

  2. I see this too! this is… not correct XD I will file a bug. Thank you!

Hey again, first thank you very much for the detailed answer! I will start looking into the controller creation. I have also found this Pegasus simulator, which hopefully will help me and other people with the same goal.
Regarding question number 1, I tried creating the environment as you explained and the drone does fall, however it still doesn’t actually touch the ground, as you can see in the picture below.

I think this might be the collision box for the drone. you can take a look if you enable collider visualization! click on the eye icon in the visualizer, then select “show by type” → physics → all. you should see a wire frame box around the drone.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.