Make a more powerful but still tiny drone.

Discussions about all things Bitcraze
olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif »

Thank you Tobias your hint was perfect! After correcting the vzkp and vzki values everything is working fine now. A little fine tuning of PID values is still open and having a look at the landing behaviour. How can I post a Video?
Attachments
crazyflie Bolt is airborne
crazyflie Bolt is airborne
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Make a more powerful but still tiny drone.

Post by tobias »

Great news! Looks like a cool drone ready to do research on. Any problems with the laser ranger sensors, e.g. detecting the props or similar?

If you want to post a video you will have to link it from e.g. youtube. Our server is to weak to have it...sorry
olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif »

I dont have issues with the ToF sensors. They are not influenced by the propellers. My next topic is how can the bolt fly inside a room in about 1,5m height starting from ground and then crossing tables and other obstacles without jumping up because of height measurement from the flow deck. How can I disable the height measurement from the flow deck and enable the baro for height measurement? Is the behavior regarding hight holding now better with the bosch sensor? Have you done further tests in this direction? If there is no solution, this will be a killing point. I can not use the top sensor for hight measurement because the ceiling is cluttered.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Make a more powerful but still tiny drone.

Post by kimberly »

Currently there is an github issue about this feature: https://github.com/bitcraze/crazyflie-f ... issues/540.

It is not implemented into the firmware yet but it might give some pointers on how to fix this. This is indeed a common problem in a lot of opensource autopilot programs so there is not an proven fix for this, so it would be good to rekindle the discussion there.

Another thing that might be added, is that you do the height control in velocity mode only.
r0b0tn1k
Member
Posts: 32
Joined: Fri Aug 30, 2019 9:53 pm

Re: Make a more powerful but still tiny drone.

Post by r0b0tn1k »

Hi, would you mind posting your pid.h values that you ended up tweaking?
Thanks!
r0b0tn1k
Member
Posts: 32
Joined: Fri Aug 30, 2019 9:53 pm

Re: Make a more powerful but still tiny drone.

Post by r0b0tn1k »

leonana69 wrote: Fri Apr 17, 2020 2:49 pm
olif wrote: Wed Apr 01, 2020 6:05 pm @leonana69
may you share your pid and thrust base values so I can compare to the crazyflie and make the right decision for my new quad?
The thrustBase is 32000 and thrustMin is 20000. For height control PID, the PID_Z_RATE_KP/KI/KD are 7.0/2.0/0.3, the PID_K_KP/KI/KD are 10.0/2.0/1.0. I didn't change other PID coefficients.

You should decide the thrustBase by testing the minimum value which can barely make the drone lift (with fixed thrustScale). The thrustScale I used is 1000, the same as the cf2.1. The thrustScale and PID coefficients both decide how fast the drone lifts.
Please excuse the ignorance, but can you update the values in the pid.h section I'm pasing below? I cant tell what is PID_Z_Rate for example, or K, etc.

Code: Select all

#define PID_ROLL_RATE_KP  250.0
#define PID_ROLL_RATE_KI  500.0
#define PID_ROLL_RATE_KD  2.5
#define PID_ROLL_RATE_INTEGRATION_LIMIT    33.3

#define PID_PITCH_RATE_KP  250.0
#define PID_PITCH_RATE_KI  500.0
#define PID_PITCH_RATE_KD  2.5
#define PID_PITCH_RATE_INTEGRATION_LIMIT   33.3

#define PID_YAW_RATE_KP  120.0
#define PID_YAW_RATE_KI  16.7
#define PID_YAW_RATE_KD  0.0
#define PID_YAW_RATE_INTEGRATION_LIMIT     166.7

#define PID_ROLL_KP  6.0
#define PID_ROLL_KI  3.0
#define PID_ROLL_KD  0.0
#define PID_ROLL_INTEGRATION_LIMIT    20.0

#define PID_PITCH_KP  6.0
#define PID_PITCH_KI  3.0
#define PID_PITCH_KD  0.0
#define PID_PITCH_INTEGRATION_LIMIT   20.0

#define PID_YAW_KP  6.0
#define PID_YAW_KI  1.0
#define PID_YAW_KD  0.35
#define PID_YAW_INTEGRATION_LIMIT     360.0


#define DEFAULT_PID_INTEGRATION_LIMIT 5000.0
#define DEFAULT_PID_OUTPUT_LIMIT      0.0
Thanks!
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Make a more powerful but still tiny drone.

Post by tobias »

I think @olif refers to tuning the position controller but I'm not exactly sure as there is no Z-rate, instead I think he mean velocity. So in position_controller_pid.c I think the values should be

Code: Select all

  .pidVZ = {
    .init = {
      .kp = 7.0f,
      .ki = 2.0f,
      .kd = 0.3f,
    },
    .pid.dt = DT,
  },
...

Code: Select all

  .pidZ = {
    .init = {
      .kp = 10.0f,
      .ki = 2.0f,
      .kd = 1.0f,
    },
    .pid.dt = DT,
  },
CamITC
Beginner
Posts: 2
Joined: Mon Jul 06, 2020 1:07 pm

Re: Make a more powerful but still tiny drone.

Post by CamITC »

Hi everyone,
I am a newbe in the crazyflie world, I have easily used the normal setup crazyflie 2.1+ flow deck+ multiranger. Now I would like to build a larger quad with the bolt + flow deck + multiranger + small camera (Max 15cm diagonal frame). Do you have any advice, websites or guides to understand better on how to calculate weight/props/motors/esc/battery ratio?
Thank you in advance!
Post Reply