Page 1 of 1

Can not set anchor positions

Posted: Wed May 03, 2017 9:49 am
by Huibean
After setting 6 anchor, I was trying set the anchor positions
But each time I change location value and click write to anchors button, nothing changed, and when I click Get from anchors button, value reset to all (0, 0, 0)
粘贴图片.png
Then I trying to set position through python lib and the LoPoAnchor's set_position func stuck
粘贴图片1.png
粘贴图片1.png (4.11 KiB) Viewed 2833 times

Code: Select all

import cflib.crtp

from cflib.crazyflie import Crazyflie
from cflib.crazyflie.log import LogConfig
from cflib.crazyflie.mem import MemoryElement

from lpslib.lopoanchor import LoPoAnchor

cf = Crazyflie(ro_cache=None)

cflib.crtp.init_drivers(enable_debug_driver=False)

while True:
    devices = cflib.crtp.scan_interfaces()
    if len(devices) > 0:
        break
    else:
        print("no device")

device_interface = devices[0][0]

cf.open_link(device_interface)
lopo = LoPoAnchor(cf)
lopo.set_position(1, (1, 0, 0))

Re: Can not set anchor positions

Posted: Thu May 04, 2017 8:43 am
by arnaud
Hi,

Are you using the latest version (from master branch) of both the Crazyflie firmware and the lps-node firmware? This functionality is still in development (it is being finished this week) and it works with the very latest firmwares.

Re: Can not set anchor positions

Posted: Fri May 05, 2017 2:45 am
by Huibean
Thanks Arnuad! It works now, after reflashing Crazyflie firmware