Wiki

Clone wiki

scl-manips-group / nengo / XML

Using XML configuration files for Nengo

Much like defining controllers for SCL, Nengo controllers can also be defined using an XML files. As an example, you can look through RPP-Nengo.xml. On this page, we'll outline the components of an xml file to define each of the four controllers listed on the controllers.py page. One of the driving factors is the ease of transitioning a controller used purely within SCL to a Nengo-based controller. Thus we assume the existence of xml files defining the controller for SCL and proceed from there.

SCL section

Here we note the path to the Cfg file used for the SCL controller, the robot name, controller name, and task name used by SCL.

Nengo section

<controller> the controller name

<mode> choose from 'default', 'rate', or 'direct.' TODO: This is currently applied to all of the neuron populations, but it might be helpful to include a 'mode override' option for the individual components of the network.

<q> and <dq> Populations to represent current joint angles and joint velocities. These are on the receiving end of the socket communication node. All that is required are subsections <neurons> (which must be a single integer) and <radius> (which may be a single float or a list of floats separated by spaces)

<torque> Again we only need number of neurons and radius. This is the last population before returning to the robot. Torque limits can be built into this population by limiting the representational range.

<default_matrix> Set the properties for any matrices used in intermediate steps of the computation that are not listed anywhere else on the xml

Mathematica defined populations
For these sections of the xml file, the following fields are required:

  • <text> Copy and paste RAW INPUT FORM from Mathematica of the matrix you wish to decode
  • <neurons> Number of neurons to use for each pool in the representation. (i.e. for an m by n matrix, how many neurons to use in each of the m*n pools)
  • <radius> Under this section, you may list individual radii for each matrix element. For example "<1> 10 </1>" means that matrix element 1 should have a radius of 10. You also have the option of defining the <default> radius which will be used for any elements that are not explicitly set.

Some of these sections include... <jacobian> <mass> <gravity>

For more specific information as to which fields are used by which controllers, please see the parse() function of the controllers defined in controllers.py

Updated