Changes between Version 75 and Version 76 of UserGuideGit
- Timestamp:
- Nov 22, 2017, 11:19:15 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UserGuideGit
v75 v76 167 167 [[Image(design_remote-control.png, 300px)]] 168 168 169 As you can see on the UML diagram, a {{{RemoteControl}}} object is build with {{{Components}}}; a {{{Component}}} can be a {{{Button}}}, a {{{ Analog}}} axis, or a {{{Joystick}}}, which is several {{{Analog}}} axes bound together.169 As 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. 170 170 171 171 === Using Mappers === … … 175 175 For example, to control the robot walk, we can create a '''Joystick''' component with 3 axes: X, Y, RZ. 176 176 177 But 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]].177 But 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]]. 178 178 179 179 See [[https://framagit.org/fma38/Py4bot/blob/master/py4bot/inputs/mappers/mapper.py|py4bot/inputs/mappers/mapper.py]] to see how this mapper is defined.
