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


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


/RoboDevel/RiSE/RobotCode/Behaviors/gaits/YourModuleName.cc
/RoboDevel/RiSE/RobotCode/Behaviors/include/gaits/YourModuleName.hh



/RoboDevel/RiSE/Demo/Config/robots/risebus12/gaitstore.rc
   ==> 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
       gaitstore.rc.


/RoboDevel/RiSE/RobotCode/Behaviors/modules/GaitStoreModule.cc
-- 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 GaitStoreModule.cc, it will create a new instance of your module's class
    when it sees that the name is the same in both places.



/RoboDevel/RiSE/Demo/Supervisor/supervisor.cc
-- 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_ORDER       (BEHAVIORAL_CONTROLLERS)
      #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 
/RoboDevel/RiSE/Demo/Config/robots/risebus12/stuccogaits.rc


**** 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 =
    "learn_module";
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 
    /home/aasbeck/RoboDevel/RiSE/Demo/Config/robots/risebus12/gaits/
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:
/RoboDevel/RiSE/Demo/Operator/Makefile

/RoboDevel/RiSE/RobotCode/Behaviors/modes/Makefile 

To add it to the GUI:
/RoboDevel/RiSE/Demo/Operator/RiSEModes.cfg


-- 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