Tekkotsu Telepathy Brett Simmers & Lisa Story 15-494, Spring 2007 For a brief tutorial on using our additions to Tekkotsu, see the telepathy website at http://www.cs.cmu.edu/afs/cs/academic/class/15494-s07/www/telepathy/details.html Files: ------------------------------------------------------------------------ telepathy.diff : a patch containing everything we changed, including new files. Tekkotsu directory: All new and changed files If you haven't changed the version of Tekkotsu this is being merged with since our copy was created, just copy all these files into the Tekkotsu directory, otherwise you should probably use the patch. ------------------------------------------------------------------------ The demos directory contains a few simple demos showing how to use the new telepathy code: HeadRemoteControlDemo.h : This will connect to the server dog and mimic its head position TailRemoteControlDemo.h : This will connect to the server dog and walk at the direction/speed that you put the server dog's tail at. For the previous two demos, you should start HeadTailServer on the server dog. This is not needed by the event/state code, all it does is relax the head and tail joints to make the movement easier/better for the dog. TextMessageDemo.h : Subscribes to text message events on the server dog and displays them when received WalkMultipleDemo.h : Listens for button presses from two server dogs and walks forward or backward accordingly. WalkRemoteControlDemo.h : Same as WalkMutipleDemo.h, but only connects to one server dog. All of these header files include "DemoCommon.h", which defines a common server dog for the demos to use. WalkMultipleDemo.h defines the second server dog on its own. The code for the demos is pretty short and simple; that was the main goal of our project. There is also a StartupBehavior_SetupModeSwitch.cc file with the demos set up in it, so just copy everything from the demos directory into a project folder to build the demos. ------------------------------------------------------------------------ Known Issues: * The wireless modifications we made (SocketListener) crash the simulator when data is received on a socket that is using a SocketListener intead of the regular callback. This should be fixed at some point. * DataEvents cannot be sent. Because DataEvent is a templated class, the code to reconstruct any given DataEvent would have to be written specially for whatever T is being used, which would require the user to modify the Tekkotsu source code to indicate the T for their specific DataEvent. To send arbitrary data, pack it into a std::string and use a TextMsgEvent. * Due to what we think is a bug in the wireless, if two chunks of data are sent within a very short time span the receiving dog will crash. It segfaults in a function that should not be able to crash (RemoteEvents::readType), so we're 95% sure it's being given a bad pointer by the wireless code (Ethan has gone over it with us and couldn't find anything wrong with our code either). Everything you need should be here; if for some reason it doesn't build/work let is know immediately.