Files you have to edit when you make a new module:

OR /RoboDevel/RiSE/RobotCode/Behaviors/modules/Makefile 
  (depending on where you put your new module)


   ==> This will start an instance of your class, identified by 
       the name you give it in quotes.  You should also have an .rc file
       of that name (the name in quotes)--that is the file it will 
       look to load values from.  See below for more about the names in

-- Add an if-statement to the long list
-- Include your header file on top
--> When you put your module/class name in gaitstore.rc, if it is also
    in, it will create a new instance of your module's class
    when it sees that the name is the same in both places.

-- Include your header file on top
-- Add line "addModule()" for your module -- this will add your module
   to the list of modules that the supervisor knows about, and will activate it.
-- Add the appropriate variables (e.g. 
      #define LEGFORCE_PERIOD      1
      #define LEGFORCE_OFFSET      0 
   if they haven't been defined elsewhere.

If you want to make it appear on the GUI, must add a line to 

**** Making gaits with GaitRunner: slight modification of the above.
- Don't need to add anything to the supervisor
- add line to gaitrunner.rc, not stuccogaits.rc

More about names in gaitstore.rc:

Make "ClassName" in gaitstore.rc (string type = "ClassName") equal to "ClassName" in GaitStoreModule.
==> make them both equal to the classname.  

In gaitstore.rc, you have a line like:
  string items =
Each unique name is the name of an instance of the class.  
In your module file, if you load parameters from a .rc file, you need to have a .rc file 
by **this string item name** in 
because that is where it will look for the .rc file and of that name.  

This name gets passed to the Gait parent, e.g. in the ForceBalGait constructor it says 
    ForceBalGait::ForceBalGait( const char * name ): Gait(name).
Also in ::initialize( it looks up this name via 
    snprintf(filename, 128, "gaits/%s.rc", getName() );

If you make a mode, you need to edit:


To add it to the GUI:

-- AlanAsbeck - 07 Jan 2007

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