Get LPS Node Position via CF2.0

All discussions related to the Loco Positioning system
Post Reply
Posts: 14
Joined: Mon Nov 26, 2018 2:20 pm

Get LPS Node Position via CF2.0

Post by HuzayfaaN »


I am looking at getting the positioning of the nodes, via the CF2.0 and as part of a python script, and printing this information. This would help identify that the nodes are correctly assigned and have been identified prior to a script continuing to run.

I have spend much time looking around and also tried various code to try and achieve this, however I have been unsuccessful and was wondering if this could be achieved and if so how?

Many thanks,
Posts: 322
Joined: Tue Jun 30, 2015 7:47 am

Re: Get LPS Node Position via CF2.0

Post by kristoffer »


The node positions are available through a memory mapping in the memory sub system, ...

Use the memory type MemoryElement.TYPE_LOCO2 and the LocoMemory2 class.
The anchor_data member is a dictionary containing mappings from anchor id ==> AnchorData2 objects.

For a (somewhat convoluted) usage example see the Loco Positioning tab in the python client. ... ... ...
Post Reply