[770c98]: / Application / Examples / PedalDemo / Model / Environment.any

Download this file

61 lines (56 with data), 1.5 kB

AnyFolder EnvironmentModel = {

  // Global Reference Frame
  AnyFixedRefFrame GlobalRef = {
    AnyRefNode Hpoint = {
      sRel = ...Hpoint;
      AnyRefNode SeatPoint = {
        sRel = {0,-0.18,0};
        AnySurfEllipsoid Seat = {
          Radius = {0.2, 0.01, 0.2};
          AnyDrawParamSurf drw = {
            RGB = {223,124,7}/255;
          };
        };
      };
    };
    AnyRefNode LeftFoot = {
      sRel = {-0.25, -0.15, -0.20};
      ARel = RotMat(25*pi/180,z);
      AnySurfEllipsoid FootRest = {
        Radius = {0.1, 0.01, 0.1};
        AnyDrawParamSurf drw = {
          RGB = {160,90,8}/255;
        };
      };
    };
    AnyDrawRefFrame drw = {
      ScaleXYZ = {1,1,1}/10;
    };
  };  // Global reference frame
    
  AnySeg Pedal = {
    r0 = {-0.14,-0.08,0};
    Axes0 = RotMat(120*pi/180,z);
    Mass = 2;
    Jii = {0.05, 0.001, 0.05};
    AnyRefNode Hinge = {
      sRel = {0, -0.15, 0};
    };
    AnyRefNode FootNode = {
      sRel = {0, 0.15, 0};
    };
    AnyDrawSeg drw = {};
  };
  
  /// Hinge between the pedal and ground
  AnyRevoluteJoint HingeJoint = {
    Axis = z;
    AnyFixedRefFrame &Ground = .GlobalRef;
    AnyRefNode &Pedal = .Pedal.Hinge;
  };

  /// Torsional spring supporting the pedal
  AnyForce Spring = {
    AnyRevoluteJoint &Hinge = .HingeJoint;
    //F = -13.7*.HingeJoint.Pos;
    //F = 0*.HingeJoint.Pos;
    F = -..SpringStiff*.HingeJoint.Pos;
  };
};