Changes between Version 76 and Version 77 of UserGuideGit


Ignore:
Timestamp:
Nov 22, 2017, 11:26:17 AM (8 years ago)
Author:
fma
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuideGit

    v76 v77  
    169169As you can see on the UML diagram, a {{{RemoteControl}}} object is build with {{{Components}}}; a {{{Component}}} can be a {{{Button}}}, a {{{Switch}}} an {{{Analog}}} axis, or a {{{Joystick}}}, which is several {{{Analog}}} axes bound together.
    170170
    171 === Using Mappers ===
     171=== Components ===
     172
     173'''Py4bot''' implements different components to build a custom remote control mapping:
     174
     175==== {{{Button}}} ====
     176
     177This is a simple push button, whith several ''triggers'', in order to control its behavior:
     178
     179 * click
     180 * double-click
     181 * press
     182 * release
     183 * hold
     184 * double-hold
     185
     186Default trigger is ''click'' (you must press and release the button quickly).
     187
     188==== {{{Switch}}} ====
     189
     190This is a button toggling between 2 states when you press it.
     191
     192==== {{{Analog}}} ====
     193
     194This component handles a single analog axis.
     195
     196==== {{{Joystick}}} ====
     197
     198Combines several {{{Analog}}} axes.
     199
     200=== Configurations and modifiers ===
     201
     202There are many commands to control the robot, and not enough physical buttons/axis on a gamepad. So, a solution is to multiplex these buttons/axis. There are 2 ways to do that: ''configurations'' and ''modifiers''. ''configurations'' allow us to change the entire mapping; ''modifiers'' only changes a button meaning.
     203
     204To create several ''configurations'', we use the {{{_addConfig()}}} method. This method take a string as argument, the name of the config. In our example, we created 2 ''configurations'', one to dynamically control the robot (make it walk), the other one to statically control the robot (move the body).
     205
     206=== Mappers ===
    172207
    173208'''Mappers''' are simple objects helping to adapt params from '''!RemoteControl''' '''Components''' output to '''Robot'''/'''!GaitSequencer''' methods input.