Main /

Making Gaits

_____________________________

Getting Started in Modlab!

Information for Leaders

People

Lab Resources

Software Guides

Hardware Guides

Lab Website

Fun Stuff
_____________________________

edit SideBar

Making Gaits

Making Gaits

A gait is simply a text file that has lines and rows of numbers. Each number represents a module’s position. Each column represents a module, and each row represents a step or moment in time. There are other parameters that allow for gait customization as well as ease of creation. They are as follows:

  • Loop-Once the last line of the gait is reached, it will go back to the first line and play the gait again.
  • Speed-Speed is the number of lines (or rows) per second that are played back in the gait.
    • A value of 2 would send 2 lines every second or one line every half second.
    • A value of .5 would send .5 lines every second or one line every two seconds.
  • FPS-FPS or Frames Per Second specifies the number of interpolations between the lines in the gait. This can make a gait smooth or jerky.
    • High numbers send many interpolations between lines in the gait, but may flood the transmission.
      • This results in delayed motion and dropped lines.
    • Low numbers send few interpolations between lines in the gait, but if too few are sent, less lines are sent than the Speed requires and this stops the gait.

Within a gait:

  • //-This is a one lined comment.
  • /*…*/-This is a multi-lined comment. The comment starts at the /* and ends at the */.
  • #2#-This changes the speed mid-gait. The numbers between the #s can be any positive number.
  • $50$-This changes th FPS mid-gait. The numbers between the &s can be any positive number.
    • Note: If the FPS are less than twice the speed then the gait will stop.
  • @5A,7,4C, 1@-In the simulator, simulate module 5A disconnecting from a connected module and connecting to 4C via 5A’s IR port 7 and 4C’s IR port 1
    • Note that the above command is different than @4C, 1, 5A, 7@ because now 4C will disconnect from a neighbor and connect to 5A.
  • {…[5]}-Loops the lines of code within the braces the number of times that is in the brackets.
    • Note that the bracketed number must lie (anywhere) within the braces or before them.
  • ”C:\Program Files\CKBotGUI\Samples\MagnetDemo.gait”-Imbeds the specified gait in the current gait.
  • ”MagnetDemo.gait”-Imbeds the specified gait in the current gait assuming the gait file is located in the folder specified in the Preferences window.
  • 0-Sets the module to the default position of 0 degrees.
  • 9000-Sets the module to the maximum position of 90 degrees.
  • -9000-Sets the module to the minimum position of -90 degrees.
  • Use numbers between 9000 and -9000 for angles between 90 and -90.
  • 9001-Makes a module go limp (automatically done at the end of a gait).
  • 9002-Ignores this line for the specified module (useful with joystick).
  • Separate modules by a , and steps by a new line.
    • -3000,3000,-3000,3000
    • 4500,-4500,4500,-4500
Recent Changes (All) | Edit SideBar Page last modified on February 11, 2009, at 04:42 PM Edit Page | Page History
Powered by PmWiki