Foot And Leg Trajectory Basic Test

(Notes on How to run a basic test, for complete testing procedures, see FootAndLegTrajectoryTestingProcedure)

Creating a .RC file (This text file holds all the trajectory settings)

  • This file should be securly copied to bailorgana, so its easiest to use Matlab on the Linux machines
  • Open Matlab and find a copy of the profile generating code
    • The latest versions are stored on chewie at /users/Software/LegTestCode/
    • FourBar_Tilt.m - allows you to select velocity and tilt profiles for the 2 motors
      • This file requires the GUI interface file FourBar_Tilt.fig to work
      • 1. Enter the velocity in hertz for the leg period
      • 2. Enter the velocity profile (press ENTER to stop adding points)
      • 3. Click the Update button to adjust the profile to fit the given velocity
      • 4. Enter the tilt profile
      • 5. Save the file
      • The .RC file should be named profile_gait.rc to be used by the program legprofile_test2 on the stack
      • Note: Bad profile selection can result in jittery motor control (ie. could damage leg/foot prototype)
      • Note: Try to select points evenly spaced on the phase axis (This translates to more evenly spaced times)
      • Note: If you are having difficulty with jitter, try adjusting the smoothing value in the .RC file to be smaller than the time spacings
    • FourBar_PosVel.m - allows you to select a constant leg velocity for the 4-bar motor and sinusoidal parameters for the tilt motor
      • 1. Enter the velocity in hertz for the leg period
      • 2. Enter the base angle offset for the tilt motor
      • 3. Enter the amplitude of the tilt sin wave in degrees
      • 4. Enter the phase offset for the tilt motor in degrees
      • 5. Enter the test duration
      • Two plots will pop up, one showing the approximate 3D trajectory relative to the body, the other showing the trajectory for the tilt motor
      • 6. Save the .RC file
      • The .RC file should be named poscontrol_test.rc to be used by the program poscontrol2 on the stack
      • Note: The control works very well, and is fairly straight-forward
      • Note: This program has less control of the leg trajectory, but its easier to generate "safe" files to run
  • Copy the .RC file to bailorgana
    • Use the scp command to securely copy the .RC file to bailorgana
      • Usage: scp {filename} {username}@{hostname}:{folder}
      • Eg. scp profile_gait.rc rhex@bailorgana:users/amcclung/LegTestCode01
      • Edit the script copy2bailorgana.sh to automate the process and copy specific files
  • Note: If necessary use emacs or vi to edit the .RC

Start the test

  • Go to the directory with the test code on bailorgana
    • This is currently /home/rhex/users/amcclung/LegTestCode01
  • Switch users to the root user
    • To switch users, use su root or just su and then enter the password, type exit when you're done
  • (VER 3 and previous) Adjust the leg (both tilt and 4-bar position) to initial position
    • The initial position will be used as the start position for the profile
  • (VER 4 and higher) Place the hard stops on the setup for calibration
    • You may want to edit the calibration variables to set your initial position (see below)
  • Execute the program from the current directory (ie. ./poscontrol_test2)
    • POSCONTROL_TEST2
      • This program gives a constant velocity to the 4 bar linkage motor. The tilt motor is given a sinusoidal signal.
      • This file reads poscontrol_test.rc for profile values
    • LEGPROFILE_TEST2
      • This program allows for varying velocities to the 4 bar linkage motor. The tilt motor position can be selected for the full period.
      • This file reads profile_gait.rc for the trajectories and legprofile_test.rc for the test duration
      • Edit legprofile_test.rc to change the test length
    • All executables currently use position control for the motors
  • (VER 4 and higher) The calibration routine starts instantly and sets the motor to the initial position
    • Once the calibration is finished, the program will PAUSE and wait for user input
  • (VER 4 and higher) Remove the hard stops once the calibration is done
    • ALERT! If you do not REMOVE the stops, you can damage the leg setup
    • Press any key to continue to START the test, AFTER you remove the stops
  • After everything has been initialized (& calibrated) for the test, the progam PAUSES until the user presses a key.
  • The test profile is executed (looped) for the length specified by the related .RC file
  • ALERT! NOTE: Press Ctrl-C to stop the test at any time
  • ALERT! Latest versions: LEGPROFILE_TEST6 , POSCONTROL_TEST6
    • Additions: Faster, manual calibration routine

  • Variables :
    • poscontrol_final_time - the time length of the test [Units: seconds]
    • For POSCONTROL versions
      • poscontrol_period - the period for the leg trajectory [Units: seconds]
      • poscontrol_leg_speed - the velocity for the CRANK motor [Units: rads/sec]
      • poscontrol_angle_offset - the base WING offset from the initial position for the cos signal to the WING motor [Units: degrees]
      • poscontrol_amplitude - the amplitude of the cos signal to the WING motor [Units: degrees]
      • poscontrol_time_offset - the spatial offset for the start of the cos relative to the start of the period [Units: degrees]
    • For LEGPROFILE versions - The variables are defined by the designated Matlab script and placed in profile_gait.rc, see Trey if you are interested in manually editing these

Code Versions Notes
poscontrol versions  
POSCONTROL_TEST Unrefined, working code
POSCONTROL_TEST2 Initial group usable version
POSCONTROL_TEST3 Added 2nd blinking syncronization digital output to POSCONTROL_TEST2
NOTE Later versions will be placed in /home/rhex/users/amcclung/LegTestCode02
POSCONTROL_TEST4 Added 2 axis fully autonomous motor calibration to POSCONTROL_TEST3, unrefined coding
POSCONTROL_TEST5 Refined the parameters and coding of POSCONTROL_TEST4
POSCONTROL_TEST6 Same as VER 5, but calibration requires manually moving leg to stops
legprofile versions  
LEGPROFILE_TEST Unrefined, working code
LEGPROFILE_TEST2 Initial group usable version
LEGPROFILE_TEST3 Added 2nd blinking syncronization digital output to LEGPROFILE_TEST2
NOTE Later versions will be placed in /home/rhex/users/amcclung/LegTestCode02
LEGPROFILE_TEST4 Added 2 axis fully autonomous motor calibration to LEGPROFILE_TEST3, unrefined coding
LEGPROFILE_TEST5 Refined the parameters and coding of LEGPROFILE_TEST4
LEGPROFILE_TEST6 Same as VER 5, but calibration requires manually moving leg to stops

  • ALERT! Notes :
    • For LEGPROFILE_TEST5, the variables are contained within legprofile_test.rc, which is a relatively static file in the working directory. To statically change the variables, use emacs or vi to edit the .RC
    • For POSCONTROL_TEST5, the variables are contained within poscontrol_test.rc, which is produced each time FourBar_PosVel.m is used to produce trajectories. To statically change the variables, edit the Matlab script to output different values for subsequent RC files.

Please add notes as the testing procedure evolves

ALERT! NOTE: See FootAndLegTrajectoryTestingProcedure for complete testing details

-- AMcClung? - 15 Apr 2004

 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback