Football Table Motion
Here we explain
MOTION.mdl (aliases/alternate versions:
MOTION.mdl is compiled as an external and hence you run in from a terminal (as a super user). Compilation is done by running
make.m, which is located in the main folder.
The three different version all serve different needs, to use one: save them as MOTION.MDL and compile
- Demonstration ready, uses only old code (no Reinforcement learning and a simple policy).
- Used for frf-measurements, this by-passes homing and safety, so make sure to center all rods before running. Secondly, check to see if there are actually weak controllers set in this file. The output of this file is the same as all of the variant, a log file called
MOTION.mat. An m-file which processes the data can be found in the
../toolsfolder(determines all transfer functions), you can use the output for loopshaping with i.e.: shape-it.
- Experimental version, this file is kept to test new systems e.g. new moves etc.
- Simulator version, use this file for generating experience. More on this can be found here.
In this subsystem one can disable rods from moving at all, or just allowing them to home. It is recommend to first attempt homing before running the system in its entirety. Do disable/enable rods all you have to do is double-click on them.
Reference generation dialog
In the reference generation dialog we can alter/tweak the homing position and the reference saturation.
- Rod number
- Number index of the rod, starting with the goal-keeper being rod 1.
- Rotational Homing position
- Amount of degrees the puppet needs to rotate (for it to be upright) after detecting the homing sensor.
- Rotational Homing Velocity
- Speed at which to perform the rotational homing.
- Translational Homing position.
- This is the translation necessary to move to a central positron after hitting the end of its stroke(/side of the table).
- Translational Homing Speed
- Speed at which to perform the translational homing
- Error in translation to determine homing point
- This is a threshold, when the error becomes larger then this it assumes it has hit a wall.
- Translational saturation
- Absolute value at which to saturate the translational reference signal so not to hit the sides.
The safety has been put in to stop large voltages to be sent as the output for both the translational and rotational controller. Once it exceeds a certain threshold the output is set to zero.
- Rod number
- Same as before
- Maximum rotational voltage
- Absolute maximum value of the control signal for rotational controller
- Maximum translation voltage
- Absolute maximum value of the control signal for translational controller
- Maximum rotation
- Maximum value of sensor read-outs, if this is exceeded it assumes failure and stops the executable (stop excessive spinning when stability is lost).
- Maximum transalation
- Maximum value of sensor read-outs, if this is exceeded it assumes failure and stops the executable (happens e.g. a cable snaps).
As said, building the file is really easy and is done using
make.m. If this executes properly it will create an executable called
MOTION in the main folder. This file currently requires Matlab R2011a (or below), as it makes use of a piece of code which is deprecated in later versions (see `Termination Block' in the simulink model).
You can run the motion executable by starting a terminal and typing the following code:
When running the external, first homing will take place (apart from
MOTION_frf). I recommend first attempting just to home it, by using the enable/disable options explained earlier. Once this is done, it will run until you stop it using
ctrl+c, the final time is reached or when the emergency stop is used( not recommended as a default). If it crashes for some reason, or does not home see this section
libmotion_tools is a small library created for common calculations performed on the table; puppet selection, intersection point calculation, et cetera. It functions using a class, this class has private variables that remembers what puppet is currently selected. The latter is really useful to avoid hectic switching of puppets in twilight zones.
In this section we shortly describe how to use this library.