Esempio n. 1
0
    def _write_positions_to_anchors(self):
        lopo = LoPoAnchor(self._helper.cf)

        for id, anchor_pos in self._anchor_pos_ui.items():
            if id in self._anchors:
                position = anchor_pos.get_position()
                lopo.set_position(id, position)
    def write_positions_to_anchors(self, anchor_positions):
        lopo = LoPoAnchor(self._helper.cf)

        for _ in range(3):
            for id, position in anchor_positions.items():
                lopo.set_position(id, position)
            time.sleep(0.2)
    def write_positions_to_anchors(self, anchor_positions):
        lopo = LoPoAnchor(self._helper.cf)

        for _ in range(3):
            for id, position in anchor_positions.items():
                lopo.set_position(id, position)
            time.sleep(0.2)
    def _write_positions_to_anchors(self):
        lopo = LoPoAnchor(self._helper.cf)

        for id, anchor_pos in self._anchor_pos_ui.items():
            if id in self._anchors:
                position = anchor_pos.get_position()
                lopo.set_position(id, position)
Esempio n. 5
0
        def update_in_drone(
                self):  # The self arg is used because of the decorator only
            drones_ids, drones = zip(
                *self.server.get_module('CRAZYFLIE').get_connected_drones())

            anchor = LoPoAnchor(drones[0]['cf'])
            anchor.set_position(node_id, (x, y, z))

            crazyflie_module = self.server.get_module('CRAZYFLIE')
            for drone_id in drones_ids:
                crazyflie_module.osc_update_lps_pos('',
                                                    drones=drone_id,
                                                    nodes=node_id)