Page 1 of 1

Differences between Commander and Motion_Commander Class

Posted: Tue Oct 16, 2018 2:29 pm
by aybarskizilay
Hello everyone,

I have bought CrazyFlie indoor-bundle and additonally flow deck. I am looking forward to fly some CrazyFlie :)

Until my items are here, I was checking the python libraries and example codes as well as tutorials about setting LPS.
My first question: How can I define or determine my (0,0,0) point in LPS? or Can I locate my CrazyFlie in some point on my tracking area and set it as (0,0,0) point? so it will be kind of local center
My second question is regarding the navigating my CrazyFlie in 3D (x,y,z). So I basically want to give a command to CrazyFlie "fly to (x,y,z)". Should I use the following code in the Motion_Commander library:

Code: Select all

def move_distance(self, distance_x_m, distance_y_m, distance_z_m,velocity=VELOCITY):

or Should I use the following code iin the Commander library:

Code: Select all

def send_position_setpoint(self, x, y, z, yaw):
Best Regards

Aybars

Re: Differences between Commander and Motion_Commander Class

Posted: Wed Oct 17, 2018 8:24 am
by arnaud
Hi,

When setting up the LPS you have to set the position of the anchor in the room coordinate system, by doing so you need to have defined the origin and orientation of your positioning system in the room. So you will choose the (0,0,0) point during setup.

The motion commander was designed with the flow in mind, it only works with relative movement in X/Y and absolute height for Z, this is built around the capabilities of the flow deck.

The send_position setpoint function is setting the position setpoint of the Crazyflie, this is the one you want to use if you want the Crazyflie to go and stay to an (x,y,z) coordinate.

Re: Differences between Commander and Motion_Commander Class

Posted: Wed Oct 17, 2018 9:07 am
by aybarskizilay
Hello,

Thank you for your answer. Your answer clears what is what :) I am looking forward to build the system.