Skip to content
Za-Za edited this page Dec 8, 2016 · 11 revisions

Using pacer-tests to improve a robot model: 0. In order to properly set up the directory variables for the application, the user must follow the instructions on the Pacer page to get Pacer setup and ready to run, then go to the Build directory within BotBuilder and run the following command: source setup.sh.

  1. The user edits the init.sh file in the FrontEnd directory to match the values of their initial robot model. The modifiable values including the lengths and radii of the limbs and feet, as well as the length, width, and height for the robot base, and a single density that is used for all parts of the robot.

  2. The user then goes to the FrontEnd directory from the parent directory of Build and runs the execute.sh bash file after modifying the size of the sliding window during testing, the maximum velocity that will be tested, and the change in velocity that will occur between each generation of poseSets in that file.

Data Input: none Data Output: the environment variables from init.sh and execute.sh are passed along into the child process generate.sh in the script directory, all variables are taken in as single field strings.

The variables are as follows:

init.sh: lenF1 lenF2 FfootLen lenH1 lenH2 HfootLen base_size_length base_size_width base_size_height FlinkRad HlinkRad massF1 massF2 massF3 massH1 massH2 massH3 massBase FfootRad HfootRad

KINEMATIC <-used to determine whether a new kinematic model needs to be generated jac_count < determines whether to use full tests or short version for jacobian data

execute.sh:

export modelNo export max_vel export delta_v export curr_vel export unit_len unit_den unit_rad test_dur #sliding window length curr_line #start line of current window curr_iter #number of runs this window so far

  1. The simulation will generate the model with the initial parameters and run a kinematic simulation of the model in the Kinematic directory, creating a file to hold the position, velocity, and acceleration of all joints for each change in velocity, starting at a velocity of the input deltaV and ending at the maximum velocity.

--------------------------------generate.sh data---------------------------------------------------------------------- input: all of the environment variables from the previous step are passed along to this shell process from its parent, for simplicity I will simply refer to the execute.sh and init.sh environment variables, the details of which can be found above.

output: generate.sh generates a model-1.xml file that is moved to the Kinematic directory,environment variables to child

------------------------------Kinematic test data--------------------------------------------------------------------- input: model-1.xml, environment variables output: PoseSet files that contain lines for the limit testing phase in the form: LF_X_1_q LF_X_1_qd LF_X_1_qdd RF_X_1_q RF_X_1_qd RF_X_1_qdd LH_X_1_q LH_X_1_qd LH_X_1_qdd RH_X_1_q RH_X_1_qd RH_X_1_qdd base_command_0 base_command_1 base_command_2 base_command_3 base_command_4 base_command_5

  1. Then, those sets are used in the limit testing with Moby on to have the robot cycle through its gait through the sliding window(If the sliding window is size five the test will run from line 1-5, 2-6, 3-7, and so on) in the Testing directory checking to see if any of the joints hit a velocity or torque limit.

-----------------------------------------Limit test data------------------------------------------------------------ input: environment variables, poseSet files output: sets of limit values for each joint and each limit for the original model and all perturbed models for the jacobian, the first two are the actual model and each environment variable is of the form joint_name_tor and joint_name_vel where joint_name is an actual joint name(like LF_X_1), the others are of the form #_joint_name_vel or #_joint_name_tor where # is the one-indexed number corresponding to the variable being perturbed in error_check_builder, these will collectively be referred to as "limit values"

Also, this exports a line to matlabData.txt of the form environment variables in the same order of init, and limit variables for the robot(not the perturbed ones) in the order they were generated LF->RF->LH->RH, X_1->Y_2->Y_3 followed by velocity test ended on, iteration test ended on, and the model number.

  1. If they don't, the simulation exits and tells the user that they have a working model, if it does then the parameters of the model and the limit values of each joint are recorded in a text file, and steps 3-4 continue for new models that have one parameter perturbed by 1 unit value(density, length, or height, all currently set to .001 of their SI units) that instead of starting new tests when they hit a limit, will instead record their limit values in variables to be used later.

  2. If there is more than one line in matlabData.txt(signifying that more than model has been created in this run) then instead of going to the model editer, the program is directed to the sample directory within the Brittleness directory where bifurcation tests are ran.

  3. Once all perturbed/brittleness tests are run, a new gui window pops up with sliders that can adjust the parameters y slider value*unit value, the absolute error from the first set of joint limits hit, and then relative errors produced by the qd and u values of all joints from that parameters perturbed tests minus the value of the absolute error. -----------------------------------------------GUI input-------------------------------------------------------------- input: environment variables, limit values for original and perturbed models output: new environment variables based on user input

 Jacobian gui window:

 ![](https://cloud.githubusercontent.com/assets/11771729/20638897/135c7782-b382-11e6-8bf2-772354f3bbc5.png)
  1. Once the user has made their modifications to the model, the process starts over at step 3 with the new parameters.

Clone this wiki locally