## Differences between Commander and Motion_Commander Class

All discussions related to the Loco Positioning system
aybarskizilay
Beginner
Posts: 24
Joined: Tue Oct 16, 2018 2:03 pm

### Differences between Commander and Motion_Commander Class

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

arnaud
Bitcraze
Posts: 2028
Joined: Tue Feb 06, 2007 12:36 pm

### Re: Differences between Commander and Motion_Commander Class

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.

aybarskizilay
Beginner
Posts: 24
Joined: Tue Oct 16, 2018 2:03 pm

Hello,