Classes
CompressedSegment
CompressedSegment(duration, element_x, element_y, element_z, element_yaw)
Ancestors (in MRO)
- cflib.crazyflie.mem.trajectory_memory._CompressedBase
Methods
def pack(self)
CompressedStart
CompressedStart(x, y, z, yaw)
Ancestors (in MRO)
- cflib.crazyflie.mem.trajectory_memory._CompressedBase
Methods
def pack(self)
Poly4D
Poly4D(duration, x=None, y=None, z=None, yaw=None)
Class variables
Poly
Methods
def pack(self)
TrajectoryMemory
TrajectoryMemory(id, type, size, mem_handler)
Memory interface for trajectories used by the high level commander
Initialize trajectory memory
Ancestors (in MRO)
Instance variables
poly4Ds
Methods
def disconnect(self)
def write_data(self, write_finished_cb, write_failed_cb=None, start_addr=0)
Write trajectory data to the Crazyflie. The trajectory in self.trajectory is written to the Crazyflie. By default the trajectory is written to address 0 of the Crazyflie trajectory memory, but it is possible to use a different address. This can be interesting if you want to define more than one trajectory but it requires careful handling of the addresses to avoid overwriting trajectories and staying within the trajectory memory.
Parameters
Name | Description |
---|---|
write_finished_cb | A callback that is called when the write trajectory is uploaded. |
write_failed_cb | Callback that is called if the upload failed |
start_addr | The address in the trajectory memory to upload the trajectory to (0 by default)@return The number of bytes used for the trajectory |
def write_data_sync(self, start_addr=0)
Same functionality as write_data() but synchronous (blocking)
Args: start_addr (hexadecimal, optional): The address in the trajectory memory to upload the trajectory to. Defaults to 0x00.
def write_done(self, mem, addr)
def write_failed(self, mem, addr)