WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rating: Thread Rating: 9 votes, 5.00 average. Display Modes
Old 04-21-2005, 04:29 AM
sjroorda sjroorda is offline
Join Date: Apr 2005
Posts: 13
Flock of Birds recognized, but no data received

Using the trial version of Vizard 2.51 (running Windows XP) to see if it addresses my needs, I try to add tracker functionality. I have a Flock of Birds (Ascension), and it is recognized by Vizard, but no data is received. Are there any known problems with this tracker?

Neither an example program works, nor the script made using the tutorial.

My code:
sensor = viz.add('flockofbirds.dls');
Manually triggering events (data = sensor.get(); print data) prints only non-changing values.

Output of Vizard is
flockofbirds.dls - WorldViz Flock of Birds Driver v0.1

Using FoB with another program works well!

Last edited by sjroorda; 04-21-2005 at 07:33 AM.
Reply With Quote
Old 04-21-2005, 12:40 PM
tobin tobin is offline
WorldViz Team Member
Join Date: Feb 2003
Posts: 251
Our FOB plug-in is admittedly not the most sophisticated. It limits include a single bird operation and hard-coded settings such as COM1 at 115.2kbs. I'm copying the C code below that initializes and updates the Bird below. Perhaps by looking at our initialization statements, you'll see what might be causing yours to not work.

A preferred method to connect to a FOB is to use the open-source VRPN protocol. Vizard fully support VRPN devices and from our experience most users are pleased with the results they get from this method. We have a small redistribution of VRPN along with a sample Vizard script that you can immediately download and test out. You'll need to edit the vrpn.cfg file to connect to a FOB rather than run in the test mode which it's in right now (see the readme.txt file).

You can download the VRPN demo here:

If you have any further troubles, please don't hesitate to ask further questions.

Here's the guts of the Vizard FOB plug-in:

PHP Code:
void InitializeSensor(void *sensor)
BOOL birdFound FALSE;
WORD comport 1;
int i 1<= 2i++) {
comport i;
birdRS232WakeUp(1,TRUE,1,&comport,115200,2000,2000)) {
birdFound TRUE;

birdFound) {
printf("** ERROR: Could not find bird on COM 1 or 2\n");
VRUTSensorObj *)sensor)->status FALSE;

VRUTSensorObj *)sensor)->status TRUE;



void UpdateSensor(void *sensor)
// Update the sensor data fields (see sensor.h)
    // Fields 0-2: reserved for x, y, z position data
    // Fields 3-5: reserved for yaw, pitch, roll
    // or
    // Fields 3-6: reserved for quaternion data
    // eg:
    // ((VRUTSensorObj *)sensor)->data[0] = newX;

if (birdFrameReady(1))

BIRDREADING *preading;
preading = &frame.reading[0];

double pos_scale devconfig.wScaling;

pos[0] = (float)(preading->position.nX pos_scale 32767.0f) * 0.0254f;
pos[1] = (float)(preading->position.nY pos_scale 32767.0f) * 0.0254f;
pos[2] = (float)(preading->position.nZ pos_scale 32767.0f) * 0.0254f;

VRUTSensorObj *)sensor)->data[0] = pos[1] - offset[1];
VRUTSensorObj *)sensor)->data[1] = -(pos[2] - offset[2]) + height;
VRUTSensorObj *)sensor)->data[2] = pos[0] - offset[0];

yaw preading->angles.nAzimuth AngleConversion;
VRUTSensorObj *)sensor)->data[3] = yaw yawOffset;
VRUTSensorObj *)sensor)->data[4] = -preading->angles.nElevation AngleConversion;
VRUTSensorObj *)sensor)->data[5] = preading->angles.nRoll AngleConversion;
        } else if (
VRUTSensorObj *)sensor)->data[3] = preading->quaternion.nQ0 QuatConversion;
VRUTSensorObj *)sensor)->data[4] = preading->quaternion.nQ1 QuatConversion;
VRUTSensorObj *)sensor)->data[5] = preading->quaternion.nQ2 QuatConversion;
VRUTSensorObj *)sensor)->data[6] = preading->quaternion.nQ3 QuatConversion;


Reply With Quote
Old 05-09-2005, 05:33 AM
sjroorda sjroorda is offline
Join Date: Apr 2005
Posts: 13
Thank you for this code. I tried a little, and found out it the problem wasn't Vizard directly, but the FoB itself. I don't know the exact problem yet, but after having played with the program WinBIRD that was delivered with the Flock of Birds, after a while Vizard worked, too. Strange, but nice...
Reply With Quote
Old 05-27-2005, 02:45 PM
tobin tobin is offline
WorldViz Team Member
Join Date: Feb 2003
Posts: 251
Our Ascension Flock of Birds plug-in now works well with 1 or more birds. The plug-in expects the Flock of Birds system to be in normal address mode and will not work in other modes (plug-in attached in following message).

Vizard parameters are:

NUM_FOB = 1 or 2
PORT_FOB = 1 (default)
BAUD_FOB = 115200 (default)

In normal address mode, you enter a binary number using dip switches 4, 5, 6, 7 to adjust the bird stack to how many birds are present. If only 1 bird is present, then set all to 0. Otherwise, set each bird box according to its sequential number.

Baud rate is set with dips 1,2,3. For the default mode (115.2kbs), leave 1,2,3 ON (which is the DOWN position).

The transmitter should be plugged into the first bird in the chain. The RS-232 null model cable should also come off the first bird in the chain.

When changing bird settings, switch to STBY before changing, then back to FLY after changing.

After Vizard has connected to the bird/s, then the status light will glow red and stay on.

Here's a sample script:

PHP Code:
import viz


flock1 viz.add('flockofbirds.dls')

ball viz.add('white_ball.wrl')
flock2 viz.add('flockofbirds.dls')




def onkeydown(key):
#The keyboard button 'key' is being pressed
if key == 'r':

Reply With Quote
Old 05-27-2005, 02:58 PM
tobin tobin is offline
WorldViz Team Member
Join Date: Feb 2003
Posts: 251
New Flock of Birds plug-in

Place this file in your vizard25/plugins folder, replacing the existing file. This adds the functionality described in the previous message.
Attached Files
File Type: zip (3.5 KB, 1903 views)
Reply With Quote
Old 06-30-2006, 06:28 AM
giancamati giancamati is offline
Join Date: Jun 2006
Posts: 27
What is the event associated to the Bird? How can I map and implement a new behaviour of those events.

Best Regards.
Giancarlo Amati
Reply With Quote
Old 07-07-2006, 09:43 AM
giancamati giancamati is offline
Join Date: Jun 2006
Posts: 27

Hello everybody,

I have the following question: I connected 2 FlockOfBirds together and set the NUM_FOB = 2

now I create two tracker linked to two spheres.
The Vizard does not warn with any error message, so I suppose it is able to recognize 2 FOB but, the two sphere are not sinchronized with the FOB. It seems that Vizard receives only zeros parameters.

Any Idea about that?

Thank you so much
Reply With Quote
Old 07-18-2006, 10:28 PM
tobin tobin is offline
WorldViz Team Member
Join Date: Feb 2003
Posts: 251
In earlier posts you seem to have indicated that you got your FOB working with Vizard. Can you summarize what does and what does not work for you? If you've modified the sample script above in any way, could you please post your script so that I may look at it.

Also, are you getting any sign of life from the FOB from the indicator lights?
Reply With Quote
Old 03-01-2016, 08:36 AM
jsnow jsnow is offline
Registered User
Join Date: Mar 2016
Posts: 1

"You can download the VRPN demo here: " :


You don't have permission to access /download/ on this server.

Apache/2.2.22 (Ubuntu) Server at Port 80

Not work link, please link
Reply With Quote
Old 03-01-2016, 09:48 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,471
The ascension plug-in is included with Vizard. There is no need for an additional download to use the flock of birds.
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 01:41 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC