Problem running the motion commander example

Discussions about all things Bitcraze
Post Reply
kloya
Beginner
Posts: 5
Joined: Tue Feb 26, 2019 9:06 pm

Problem running the motion commander example

Post by kloya »

I ran the simple motion commander class demo python script but my crazyflie does not lift up and it only takes a round on the ground and one of the motor switches off that is motor m4 always i changed the motor too but same results

Connecting to radio://0/80/250K
Connected to radio://0/80/250K
Taking off!
Moving forward 0.5m
Moving up 0.2m
Doing a 270deg circle
Moving down 0.2m
Rolling left 0.2m at 0.6m/s
Moving forward 0.5m
Landing!

i am shown this but my quadcopter doesnt lifts up
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problem running the motion commander example

Post by arnaud »

Hi,

First of all I renamed the title of your post. We cannot have a forum filled of topic named "Beginer question" :-).

It does look like your Crazyflie do not have a good position estimate and so cannot fly autonomously.

Do you have any positioning system attache to this Crazyflie, ie. Flow deck, LPS deck or Lighthouse deck?

The best to debug this kind of issue is to try to fly the Crazyflie manually first using the assisted mode in the client. Either hover mode when using the flow deck or position hold mode with other positioning system. This will allow you to verify that the position controlled flight capabilities of the Crazyflie are indeed working. If not, the cause will often be that the Crazyflie cannot acquire its position and we need to find the reason for that.
kloya
Beginner
Posts: 5
Joined: Tue Feb 26, 2019 9:06 pm

Re: Problem running the motion commander example

Post by kloya »

Thank you for your reply. My crazyflie is assisted with flow deck and multi ranger deck. I tried position hold in assisted mode but the crazyflie doesnt fly stably rather it goes up and down and moves in diffferent direction and also hover mode and height hold options are not available for executing.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problem running the motion commander example

Post by arnaud »

Sounds like the flow deck is not being detected By the Crazyflie. You could check that both decks are inserted with the right orientation.

Can you connect to your Crazyflie just after boot and copy paste here the content of the "Console" tab in the client, this will contain information about the deck detection and initialization. There should be 2 decks detected for you.
kloya
Beginner
Posts: 5
Joined: Tue Feb 26, 2019 9:06 pm

Re: Problem running the motion commander example

Post by kloya »

Yes looks like i had the wrong orientation for flow deck. Sorry about that.
Thank you.
After correcting the orientation this is what i get in console
%%
9
SYS: I am 0x3934323530374718001E0026 and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_CORE: 2 deck(s) found
DECK_CORE: Calling INIT on driver bcMultiranger for deck 0
DECK_CORE: Calling INIT on driver bcFlow2 for deck 1
ZR2: Z-down sensor [OK]
PMW: Motion chip id: 0x49:0xB6
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using Kalman (2) estimator
CONTROLLER: Using PID (1) controller
MTR-DRV: Using brushed motor driver
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
MR: Init front sensor [OK]
MR: Init back sensor [OK]
MR: Init up sensor [OK]
MR: Init left sensor [OK]
MR: Init right sensor [OK]
DECK_CORE: Deck 0 test [OK].
DECK_CORE: Deck 1 test [OK].
STAB: Wait for sensor calibration...
SYS: Free heap: 5904 bytes
STAB: Ready to fly.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problem running the motion commander example

Post by arnaud »

This looks correct, both flow and multiranger decks are detected and initialized.
Post Reply