simple_sim - simple sim Operation and Programming Handbook...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: simple sim Operation and Programming Handbook simple sim was conceived of and designed over a two-week period prior to the beginning of the MIT 2.12 Introduction to Robotics class. It was initially going to be a simple simulator, but evolved into a more complex application due to changing requirements. Overall design • Simple interface, both for the user and the programmer • Multi-threaded architecture • Leverages OpenGL for graphics and SDL for OS interfacing, minimizing porting effort • Uses the Open Dynamics Engine to simulate the physics of the real world Usage manual Parameters The simple sim program takes a few parameters, listed below: •--help, -h- Print out the included help •--window-size WxH, -s WxH- Change the starting window size (default is 640x480, use it like so: -s 1024x768) •--walls FILE, -w FILE- Load the walls from FILE •--targets FILE, -t FILE- Load the target positions from FILE •--log FILE, -l FILE- Write the log to FILE •--ucparams PARAMS, -p PARAMS- Pass parameters to the UserCode – To pass a single parameter, PARAMS should be something like “ start mode=manual ” – To pass multiple parameters, PARAMS should be comma delimited KEY=VALUE pairs, example: “ start mode=wp,wpfile=wps.txt ” Parameters for the built-in UserCode The built-in UserCode supports a few parameters: • start mode= mode , where mode can be one of manual , auto or automatic , or waypoint or wp ; this sets the startup mode of the default UserCode . The default is manual • waypointfile= FILE or wpfile= FILE- FILE is the waypoint file to load for use by the built-in waypoint controller • auto wp= enable or disable- Enable or disable auto incrementing waypoint (con- tinue to next waypoint automatically instead of waiting for user input) Format of the waypoint file The waypoint file is a text file containing one waypoint per line, with comma-delimited X and Y values. The characters ’ % ’ and ’ # ’ begin comments, and cause the rest of the line to be ignored. The following is an example waypoint file: # this is a comment % this is another comment 2,2 2,-2-2,-2-2,2 # end waypoint file Format of the walls file The walls file is a text file containing coordinates, size, and color of any walls one wants. The characters ’ % ’ and ’ # ’ begin comments, and cause the rest of the line to be ignored. The fields are all comma-delimited double-precision values, in this order: X 1 ,Y 1 ,X 2 ,Y 2 ,Thickness line ,Red,Green,Blue The color values ( Red , Green , and Blue ) are to be between 0.0 (fully off) and 1.0 (fully on.) The following is an example walls file that sets up a 10 meter by 10 meter box around the origin: # format: x1, y1, x2, y2, thickness, r, g, b-5, -5, 5, -5, 0.1, 0.5, 0.5, 0.5 5, -5, 5, 5, 0.1, 0.5, 0.5, 0.5 5, 5, -5, 5, 0.1, 0.5, 0.5, 0.5-5, 5, -5, -5, 0.1, 0.5, 0.5, 0.5 Format of the targets file The targets file is a text file containing coordinates, size, and tint color of all the targets (mines) in the simulation. The characters ’targets (mines) in the simulation....
View Full Document

This note was uploaded on 02/24/2012 for the course MECHANICAL 2.12 taught by Professor Harryasada during the Fall '05 term at MIT.

Page1 / 14

simple_sim - simple sim Operation and Programming Handbook...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online