Can not set anchor positions

All discussions related to the Loco Positioning system
Post Reply
Huibean
Beginner
Posts: 4
Joined: Tue May 02, 2017 4:19 am

Can not set anchor positions

Post 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 2252 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))
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Can not set anchor positions

Post 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.
Huibean
Beginner
Posts: 4
Joined: Tue May 02, 2017 4:19 am

Re: Can not set anchor positions

Post by Huibean »

Thanks Arnuad! It works now, after reflashing Crazyflie firmware
Post Reply