User Tools

Site Tools


projects:crazyflie:crtp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
projects:crazyflie:crtp [2013-04-02 15:36]
arnaud [Serial port]
projects:crazyflie:crtp [2017-04-01 21:29]
theseankelly [Port allocation]
Line 22: Line 22:
 CRTP is implemented in 3 layers: CRTP is implemented in 3 layers:
  
-<code>+<ditaa>
  +-----------------------+  +-----------------------+
    Application/ports   |    Application/ports   |
Line 30: Line 30:
        CRTP Link       |        CRTP Link       |
  +-----------------------+  +-----------------------+
-</code>+</ditaa>
  
   * **CRTP Link** is responsible for transferring the packets between the Crazyflie and the host. It will typically handles packet size and error detection.   * **CRTP Link** is responsible for transferring the packets between the Crazyflie and the host. It will typically handles packet size and error detection.
Line 44: Line 44:
 |          |   [[projects:crazyflie:crtp:commander |Commander]]    | Sending control set-points for the roll/pitch/yaw/thrust regulators | |          |   [[projects:crazyflie:crtp:commander |Commander]]    | Sending control set-points for the roll/pitch/yaw/thrust regulators |
 |          |   [[projects:crazyflie:crtp:log#|Log]]    | Set up log blocks with variables that will be sent back to the Crazyflie at a specified period. Log variables are defined using a [[projects:crazyflie:firmware:log|macro in the Crazyflie source-code]] | |          |   [[projects:crazyflie:crtp:log#|Log]]    | Set up log blocks with variables that will be sent back to the Crazyflie at a specified period. Log variables are defined using a [[projects:crazyflie:firmware:log|macro in the Crazyflie source-code]] |
 +|          |   [[projects:crazyflie:crtp:setpointgeneric | Setpoint Generic]] | For sending generic, extensible setpoints |
 |   14         [[projects:crazyflie:pc_utils:debugdriver|Client-side debugging]]    | Debugging the UI and exists only in the Crazyflie Python API and not in the Crazyflie itself.  | |   14         [[projects:crazyflie:pc_utils:debugdriver|Client-side debugging]]    | Debugging the UI and exists only in the Crazyflie Python API and not in the Crazyflie itself.  |
 |   15         [[projects:crazyflie:crtp:linklayer |Link layer ]]   | Used to control and query the communication link | |   15         [[projects:crazyflie:crtp:linklayer |Link layer ]]   | Used to control and query the communication link |
Line 54: Line 55:
 ===== USB port ===== ===== USB port =====
 This is currently not implemented but it will potentially replace the serial port link. The use of this is to get CRTP at higher speeds than the radio can transmit. This is currently not implemented but it will potentially replace the serial port link. The use of this is to get CRTP at higher speeds than the radio can transmit.
 +
 +===== Serial port =====
 +The serial port is configured in 115200 8N1. CRTP packets are sent and received asynchronously using the following packet format:
  
 <code> <code>
Line 69: Line 73:
 +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
 :   :   :   :   :   :   :   :   : :   :   :   :   :   :   :   :   :
-+---+---+---+---+---+---+---+---+ 
-|            DATA 30            | 
 +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
 |            Cksum              | |            Cksum              |
Line 89: Line 91:
 |   Cksum    4+size  |         | Checksum. Sum of all the bytes, excluding //Start//, modulo 256. | |   Cksum    4+size  |         | Checksum. Sum of all the bytes, excluding //Start//, modulo 256. |
  
 +==== Example ====
 +To send setpoints to the [[projects:crazyflie:crtp:commander|commander]] send: 
 +<code>
 +0xaa 0xaa 0x30 0x0e 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3e
 +</code>
 +
 +To ping Crazyflie:
 +<code>
 + ->   0xaa 0xaa 0xf0 0x01 0x01 0xf2     # Sent to the copter 
 + <  0xaa 0xaa 0xf0 0x01 0x01 0xf2     # Received from the copter
 +</code>
projects/crazyflie/crtp.txt · Last modified: 2021-06-24 16:48 by kimberly