Changes between Version 50 and Version 51 of UserGuideGit


Ignore:
Timestamp:
May 19, 2016, 8:28:27 AM (10 years ago)
Author:
fma
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuideGit

    v50 v51  
    172172
    173173[[Image(design_remote-control.png, 300px)]]
    174 === Using mappers ===
     174=== Using Mappers ===
    175175
     176'''Mappers''' are simple objects helping to adapt params from '''!RemoteControl''' '''Components''' output to '''Robot'''/'''!GaitSequencer''' methods input.
    176177
     178For example, to control the robot walk, we can create a '''Joystick''' component with 3 axes: X, Y, RZ.
     179
     180But the '''!GaitSequencer''' '''walk()''' method expects '''speed''', '''direction''', '''length''' and '''angle''' params. Using the '''!MapperWalk''' mapper, you can compute all these params from X/Y/RZ axes, and send them to the '''walk()''' method. That's what we did in the [[Tutorials|tutorials]].
     181
     182See [source:/py4bot/inputs/mappers/mapper.py] to see how this mapper is defined.
     183
     184Of course, you can define your own '''Mappers'''.
    177185=== Add a new Frontend ===