FIRST Robot Simulator - Using the SimulationPanel effectively
Click on a thumbnail sketch to see the full size picture.
Intro
This page will explain how to use the SimulationPanel
to control the simulation.
The Simulation Control Window will look more or less like this.
(The proportionality of the images and text will vary from
computer to computer depending on its configuration and hardware.)
|
- On the left is the byte monitor.
Values of various variables are displayed here.
Unfortunately not every variable in the C code is accessible.
Only those variables which are sent back and forth between
the operator interface and the FRC; plus those variables which
are sent back and forth between the FRC and the robot hardware.
If you need a variable which is not shown, you may be able to
add it. Study the way SimulationPanel.tcl. You would insert
your code there.
- On the bottom left are a selection of buttons.
- REPORT -- Tells the simulator to summarize the number of errors
warnings and notes. These are messages sent by the reportstart()
and its sisters. Those functions are defined in supportfuncs.c
and supportfuncs.h.
Due to a bug, the report will not show up in the log for a cycle or two.
- INTERRUPT -- Cause an interrupt to the code.
This function is not well tested.
- Auto -- Auto mode.
- Manual -- Manual mode.
- Disable -- Disable the robot.
Please note that at the start of each simulation you MUST
select one of the buttons Auto, Manual, or Disable.
Ideally this would default to Manual.
But the code has a bug that I have been unable to erradicate.
So you will have to do it manually.
- On the bottom middle are two sliders to control simulation speed.
- FastRatio -- The number of fast cycles per slow cycle.
- SimSpeed -- Roughly the number of simulation cycles
per second.
Warning -- Cranking this number up too high will lock up
some computers.
- On the bottom right are more buttons and a time status window.
- RUN -- Run the simulation
- STOP -- Stop the simulation
- STEP -- Single step the simulation
- Time Status Window -- Elapsed Cycles and Simulation Time
- The top number has two parts.
The integer before the decimal point is the number of
slow cycles.
The integer after the decimal point is the number of
fast cycles.
If you have FastRatio set to 3, this number will increment
as so: 0.1, 0.2, 0.3, 2.0, 2.1, 2.2, 2.3, 3.0...
- The bottom number is simulation time.
To the left of the colon is the number of minutes.
To the right is the number of seconds carried out
to hundredths of a second.
- EXIT -- Exit the program
- In the middle is the message log.
- Each simulation cycle will be logged here along with
the values of many of the variables.
- Along with each simulation cycle is displayed time.
- Calls to reportstart() and its sisters will result
in output to this window.
- Substantially the same information is logged to the
file "logfile".
Remember to select Manual or Auto whenever you start your
simulation. Otherwise your simulation will not give useful
output.
Next
The Robot and Operator Interface Windows
Last modified 10 Dec 2006
http://brown.armoredpenguin.com/~abrown/contact.html
http://brown.armoredpenguin.com/~abrown/first/first2005/SimulatorDocs/SimulationPanel.html