Vizard 7 » Reference » Input Devices » Position and Orientation Trackers » Ascension
7.6

Ascension plug-in

This plug-in provides support for the Ascension Flock of Birds, MotionStar, and trakStar devices. The Ascension devices support both position and rotation data.

Note: The Flock of Birds device is not supported on 64-bit version of Vizard

Initialization

The Ascension plug-in is implemented as a Vizard extension, with the following methods/constants:

Method

Description

<ascension>.addFlockOfBirds(birds=1,

                                        port=1,

                                        baudRate=115200,

                                        hemisphere=HEMI_UPPER )

Returns a list of Flock of Bird sensors. birds is the number of birds in the flock. port is the COM port the Flock of Birds device is connected to. baudRate is the baud rate the Flock of Birds device is configured to use. hemisphere is the tracking hemisphere to initialize all the sensors with (see hemisphere constants below).

<ascension>.addMotionStar(address,

                                   hemisphere=None )

Returns a list of MotionStar sensors at the specified IP address. If hemisphere is specified, then it will set the tracking hemisphere for all the detected sensors, otherwise it will use the default hemisphere.

<ascension>.addTrakStar(hemisphere=None,

                                   maxRange=None )

Returns a list of all the detected trakStar sensors. If hemisphere is specified, then it will set the tracking hemisphere for all the detected sensors, otherwise it will use the default hemisphere. If maxRange is specified, then it will set the maximum tracking range for the transmitter, otherwise it will use the default maximum range.

<ascension>.trakStar.setMaxRange(maxRange)

<ascension>.trakStar.getMaxRange()

Set/Get the maximum tracking range of the trakStar transmitter, using one of the max range constants below.

<ascension>.HEMI_FRONT

<ascension>.HEMI_REAR

<ascension>.HEMI_UPPER

<ascension>.HEMI_LOWER

<ascension>.HEMI_LEFT

<ascension>.HEMI_RIGHT

Hemisphere tracking constants

<ascension>.MAX_RANGE_36

<ascension>.MAX_RANGE_72

<ascension>.MAX_RANGE_144

Valid maximum range constants

The Flock of Birds sensor objects have the following methods in addition to the standard extension sensor methods:

Method

Description

<bird>.setHemisphere(mode)

<bird>.getHemisphere()

Set/Get the tracking hemisphere of the bird, using one of the hemisphere tracking constants above.

The MotionStar sensor objects have the following methods in addition to the standard extension sensor methods:

Method

Description

<bird>.setHemisphere(mode)

<bird>.getHemisphere()

Set/Get the tracking hemisphere of the bird, using one of the hemisphere tracking constants above.

<bird>.getBirdNumber()

Return the bird number of the sensor.

The trakStar sensor objects have the following methods in addition to the standard extension sensor methods:

Method

Description

<trakStar>.setHemisphere(mode)

<trakStar>.getHemisphere()

Set/Get the tracking hemisphere of the sensor, using one of the hemisphere tracking constants above.

<trakStar>.getBoardNumber()

Return the board number of the sensor.

<trakStar>.getChannelNumber()

Return the channel number of the sensor.

<trakStar>.getSerialNumber()

Return the serial number of the sensor.

Note: Extended Range Transmitters (ERTs) are counted as a bird. This means you need to take it into account when specifying the number of birds. The first sensor in the list will represent the ERT.

Note: When connecting to a single bird, you need to place the Flock of Birds in standalone mode by setting the dipswitch address to 0. When connecting to multiple birds, you need to set the dipswitch address of the first bird to 1 and subsequent birds with incrementing addresses.

Example

The following example shows how to create the Ascension extension:

ascension = viz.add('ascension.dle')

This example shows how to connect to a single bird on COM1:

birds = ascension.addFlockOfBirds(birds=1,port=1)
tracker = birds[0]

This example shows how to connect to two birds on COM1 and initialize them to use the front hemisphere:

bird1, bird2 = ascension.addFlockOfBirds(birds=2,port=1,hemisphere=ascension.HEMI_FRONT)

This example shows how to connect to a single bird with an ERT on COM1:

ert, bird1 = ascension.addFlockOfBirds(birds=2,port=1)

This example shows how to get all the sensors connected to a MotionStar device at IP address 10.24.5.215:

sensors = ascension.addMotionStar('10.24.5.215')

This example shows how to connect to a trakStar system and link all the detected sensors to a model:

import vizshape

sensors = ascension.addTrakStar()
for s in sensors:
    model = vizshape.addCube(0.1)
    viz.link(s,model)