I wrote this program to help me understand how localization error would propagate through the swarm. I intended to experiment with different methods of data fusion, how to reconcile or average disparate location information. The program's usefulness is very limited as it is, but you can see the error propagation by using the predefined robot locations (press 'p'), then scan ('s'), and transmit ('t'). This causes all of the robots to identify their nearest neighbors, and then all of them transmit all of this information to everyone else. Use a scan radius ('S') of about 20. The funny triangles show the robot's actual locations (global), and the circles show the perceived locations (as perceived by the robot at the crosshairs). You can place the robots in random locations ('r') instead of predefined. When this places a new robot it gives it a random location, but it leaves existing robots in the same location as before. So, if you want to randomize all the robot locations, specify 0 robots, then do the 'r' command again specifying however many you want. You can also add ('+') or subtract ('-') robots one at a time. The robot at the crosshairs is the robot whose perspective is indicated by the red circles. You can cycle through the robots one at a time by pressing 'n'. Pressing 'l' will display a list of the perceived locations of the robots according to which robot is doing the perceiving. The 'd' key will display global coordinates of each robot with their heading in radians. The amount of random error can be controlled with 'e'. Enter angular error and coordinate error. Finally, you can press 'q' to quit. That's about it. It's a pretty simple program. Find attached the display header file that draws letters and numbers in the graphics window. OpenGL is supposed to be portable, so theoretically it should be fairly straightforward to convert this program to compile under Linux. Feel free to post the source code on your site with a GPL, if you're so inclined. v/r Rod // 7-segment display panel code #include //#include "converter.h" using namespace std; #define VERTEXA glVertex3f(d_xorigin,d_yorigin+10.0*d_inc,d_z); #define VERTEXB glVertex3f(d_xorigin+5.0*d_inc,d_yorigin+10.0*d_inc,d_z); #define VERTEXC glVertex3f(d_xorigin,d_yorigin+5.0*d_inc,d_z); #define VERTEXD glVertex3f(d_xorigin+5.0*d_inc,d_yorigin+5.0*d_inc,d_z); #define VERTEXE glVertex3f(d_xorigin,d_yorigin,d_z); #define VERTEXF glVertex3f(d_xorigin+5.0*d_inc,d_yorigin,d_z); double d_inc = 0.035; double d_z = .02; class Display{ public: void init(double x, double y, double sizefactor, int digits) { xs.resize(0); sizeincrement = sizefactor; leftextreme = x; bottomextreme = y; dbottom = y + 3.0 * sizeincrement; topextreme = y + 16.0 * sizeincrement; rightextreme = x + 3.0 * sizeincrement + digits * 8.0 * sizeincrement; for(int i=0; i temp = double_to_string(in,len); int i=0; while( i < temp.size() && i < strng.size() ) { strng.at(i) = temp.at(i); i++; } } */ void show() { glColor3f(0.9,0.9,1.0); // drawbackground(); glColor3f(0.0,0.0,1.0); for(int i=0; i xs; vector strng; double leftextreme; double bottomextreme; double rightextreme; double topextreme; double dbottom; double sizeincrement; };