Laser viewer.cpp
From HotDec
Pseudo-Code Description
OpenGL file. See OpenGL A Primer. Main functions to worry about:
recvFunction() {
Set a timeout struct for 200000 us
Configure the UDP connection
Block on network port for UDP packets or until timeout
If packet arrived
Store packet data
Call glutPostRedisplay() (This will redraw the graphical elements)
}
redraw() {
Draw shape of room for comparison Draw occupancy map to see progression of data Calculate the weighted sum or mean particle from the particle data Draw all particles Draw laser scan points Draw Hovercraft at pose of mean particle
}
