Changes between Version 56 and Version 57 of Tutorials


Ignore:
Timestamp:
Apr 11, 2016, 10:36:06 AM (10 years ago)
Author:
fma
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials

    v56 v57  
    452452=== Settings ===
    453453
    454 
    455 {{{
    456 #!python
    457 
    458 }}}
    459 
     454{{{
     455#!python
     456
     457# -*- coding: utf-8 -*-
     458
     459from py4bot.common import config
     460
     461
     462# Legs index
     463LEGS_INDEX = ('RF', 'RM', 'RR', 'LR', 'LM', 'LF')
     464
     465# Legs geometry
     466LEGS_GEOMETRY = {
     467    'RM': {'coxa': 25, 'femur': 45, 'tibia': 65},
     468    'RF': {'coxa': 25, 'femur': 45, 'tibia': 65},
     469    'LF': {'coxa': 25, 'femur': 45, 'tibia': 65},
     470    'LM': {'coxa': 25, 'femur': 45, 'tibia': 65},
     471    'LR': {'coxa': 25, 'femur': 45, 'tibia': 65},
     472    'RR': {'coxa': 25, 'femur': 45, 'tibia': 65}
     473}
     474
     475# Legs origin
     476LEGS_ORIGIN = {
     477    'RM': {'x':  35., 'y':   0., 'gamma0' :   0.},
     478    'RF': {'x':  35., 'y':  65., 'gamma0' :  30.},
     479    'LF': {'x': -35., 'y':  65., 'gamma0' : 150.},
     480    'LM': {'x': -35., 'y':   0., 'gamma0' : 180.},
     481    'LR': {'x': -35., 'y': -65., 'gamma0' : 210.},
     482    'RR': {'x':  35., 'y': -65., 'gamma0' : 330.},
     483}
     484
     485# Legs feet neutral position
     486FEET_NEUTRAL = {
     487    'RM': LEGS_GEOMETRY['RM']['coxa'] + LEGS_GEOMETRY['RM']['femur'],
     488    'RF': LEGS_GEOMETRY['RF']['coxa'] + LEGS_GEOMETRY['RF']['femur'],
     489    'LF': LEGS_GEOMETRY['LF']['coxa'] + LEGS_GEOMETRY['LF']['femur'],
     490    'LM': LEGS_GEOMETRY['LM']['coxa'] + LEGS_GEOMETRY['LM']['femur'],
     491    'LR': LEGS_GEOMETRY['LR']['coxa'] + LEGS_GEOMETRY['LR']['femur'],
     492    'RR': LEGS_GEOMETRY['RR']['coxa'] + LEGS_GEOMETRY['RR']['femur'],
     493}
     494
     495# Gaits
     496GAIT_LEGS_GROUPS = {
     497    'tripod':      (('RM', 'LF', 'LR'), ('RF', 'LM', 'RR')),
     498    'tetrapod':    (('RR', 'LM'), ('RF', 'LR'), ('RM', 'LF')),
     499    'riple':       (('RR',), ('LM',), ('RF',), ('LR',), ('RM',), ('LF',)),
     500    'metachronal': (('RR',), ('LM',), ('RF',), ('LR',), ('RM',), ('LF',)),
     501    'wave':        (('RR',), ('RM',), ('RF',), ('LR',), ('LM',), ('LF',))
     502}
     503
     504GAIT_PARAMS = {
     505    'tripod': {'length': 40., 'angle': 10., 'height': 40., 'minLength': 4., 'minAngle': 2., 'speedMin':  50., 'speedMax': 200.},
     506    'tetrapod': {'length': 40., 'angle': 10., 'height': 30., 'minLength': 4., 'minAngle': 2., 'speedMin':  50., 'speedMax': 200.},
     507    'riple': {'length': 40., 'angle': 10., 'height': 30., 'minLength': 4., 'minAngle': 2., 'speedMin':  50., 'speedMax': 300.},
     508    'metachronal': {'length': 40., 'angle': 10., 'height': 30., 'minLength': 4., 'minAngle': 2., 'speedMin':  50., 'speedMax': 200.},
     509    'wave': {'length': 40., 'angle': 10., 'height': 30., 'minLength': 4., 'minAngle': 2., 'speedMin':  50., 'speedMax': 200.}
     510}
     511
     512# Gamepad path
     513THRUSTMASTER_PATH = "/dev/input/by-id/usb-Mega_World_Thrustmaster_dual_analog_3.2-event-joystick"
     514
     515# VPython scene default size
     516SCENE_WIDTH = 640
     517SCENE_HEIGHT = 480
     518
     519}}}
     520
     521We removed the servos mapping/calibration, as we don't need them anymore, and we just added the scen default size.
    460522== Conclusion ==
    461523