Differences between Commander and Motion_Commander Class

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

Differences between Commander and Motion_Commander Class

Post by aybarskizilay » Tue Oct 16, 2018 2:29 pm

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: 1790
Joined: Tue Feb 06, 2007 12:36 pm

Re: Differences between Commander and Motion_Commander Class

Post by arnaud » Wed Oct 17, 2018 8:24 am

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: 11
Joined: Tue Oct 16, 2018 2:03 pm

Re: Differences between Commander and Motion_Commander Class

Post by aybarskizilay » Wed Oct 17, 2018 9:07 am

Hello,

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

Post Reply