20OCT06 - rather than starting a new thread for each piece of code I write on the same theme, I'll post it to my web page (created yesterday afternoon, forgive the lack of polish). I'll post a note here whenever I update the site with new examples.
The work presented here is written in C# and runs in the October CTP of MSRS. It features 16 of the robots used in the tracked vehicle simulation, driving in simple circles on either flat or rolling terrain (thanks to simulation tutorials 2 and 5).
No effort has been made to make the robots presentable in a rendered view- October CTP likes my graphics card even less than September CTP did, I can't see anything at all outside of physics view. Anyone who'd like to make it colorful, go ahead, and post some screenshots.
The main work here was to get accurate heading data - I've used a few quaternion conversion formulae and then manipulated the results a bit to give a compass heading for robots in the environment, and I'm logging this and a few other bits and pieces to a CSV file. In the attached zip file there's an excel spreadsheet, an example of what I do with this information. The code as written logs just one of the robots, but it would be an easy extension to output data in an organised fashion from all robots present.
The next version will simulate formation movement, the idea being that each robot, knowing its position, the position of the marker (that is, the robot to follow at an offset in x and z), and its own heading, can then make adjustments to the torque on each of its tracks in order to stay in formation. As can be seen, if all the robots are simply told, "drive with this motor torque on each side", they fall out of formation quite rapidly. With continuous updating of drive instructions, they should remain in the initial pattern.
To use this upload:
Unzip and copy the Teamwork directory into:
C:\Microsoft Robotics Studio (October 2006)\samples
Use the command line:
bin\dsshost /port:50000 /tcpport:50001 /manifest:"samples\Teamwork\Teamwork.manifest.xml"
Any usage issues / comments please post response.