[robocup-rescue-s] New version of simulator

From: Cameron Skinner (cam@cs.auckland.ac.nz)
Date: Wed 18 May 2005 - 00:41:14 GMT


Hi everyone.

A new version of the simulator package is now available. This new
version includes a large number of significant changes including:

1) Inclusion of the ResQ Freiburg fire simulator

2) Inclusion of the librescue development library

3) Modification of all simulator components to use librescue. The
various simulators have been greatly simplified by doing this - most are
only a few small files now.

4) TCP! All modules now use TCP by default. The kernel will also listen
for UDP connections on the port specified by the kernel_udp_port
parameter in config.txt, so you can run your old agents with the new kernel.

5) New port numbers. The default port 6000 was causing problems with
X11, so the default ports have been changed to 7000, 7001 and 8000 for
the kernel, gis and kernel UDP port respectively.

6) New score calculation. Because the new fire simulator allows
buildings to reignite, a new scoring metric has been devised. It is the
same as the old one, except that the calculation for unburnt building
area has changed. Now buildings that are partially burnt contribute to
the score - previously as soon as a building caught fire it was
considered to be destroyed.

There are several changes yet to come - they should be ready soon.

1) 3D viewer will be changed to TCP.

2) Ambulances will no longer be allowed to load rescue agents (fire
brigades, police forces and other ambulances).

3) The position history bug will be fixed - position history will
include the IDs of all objects traversed by the agent in the previous
timestep.

4) Civilian IDs will not be sent at startup.

5) Probably something else that I've forgotten.

I will send the latest release in another email. Unfortunately there are
sometimes problems with the mail server here, so if you receive an email
that says something like "an email for you has been blocked" from an
address @auckland.ac.nz then please let me know.

I will also put the latest release on my web page
(http://www.cs.auckland.ac.nz/~cam) and it will be put on the simulation
league website.

Please start using the new package and report any bugs you find to
someone on the technical committee as soon as possible.

Before I forget: The code has been tested using gcc 3.3 and java 1.4. It
is possible that gcc3.4 will produce warnings or errors, but I don't
have gcc3.4 on my machine so I can't tell you what the problem (or the
solution) will be. Hopefully someone else can!

The TCP protocol is much simpler than the UDP one - just send a 32-bit
integer containing the length of the message, followed by the message
itself. You don't need to worry about the LongUDP protocol's use of
magic numbers, sequence numbers and fragmented messages.

Sample TCP implementation in C:

unsigned char* readMessage(int socket) {
   unsigned char buffer[4];
   int received, total;
   total = 0;
   while (total < 4) {
     received = recv(socket,&buffer[total],4-total,0);
     if (received<0) throw "Error";
     total += received;
   }
   int length = buffer[0]<<24 & buffer[1]<<16 & buffer[2]<<8 & buffer[3];
   total = 0;
   unsigned char* result = new unsigned char[length];
   while (total < length) {
     received = recv(socket,&result[total],length-total,0);
     if (received<0) throw "Error";
     total += received;
   }
   return result;
}

Please don't consider the above a reference implementation - I just
typed it up now, so it probably won't even compile.

I would recommend using the librescue library for communication rather
than re-implementing the TCP code - it is likely that the protocol will
change in future (for example, length fields for properties) and using
librescue will save you the trouble of making those changes yourself.

There is currently no java implementation of TCP, but if someone feels
like modifying YabAPI and rescuecore then please do so.

Thanks,
Cameron.

-- 
Cameron Skinner
Artificial Intelligence Group
Department of Computer Science
The University of Auckland

email: cam@cs.auckland.ac.nz phone: +64 9 3737599 x82924 fax: +64 9 3737453

Post: Department of Computer Science The University of Auckland Private Bag 92019 Auckland New Zealand _______________________________________________ robocup-rescue-s mailing list robocup-rescue-s@mailman.cc.gatech.edu https://mailman.cc.gatech.edu/mailman/listinfo/robocup-rescue-s



This archive was generated by hypermail 2.1.3 : Wed 18 May 2005 - 01:05:58 GMT