Skip to content

not working on my robot  #2

@ChevalierLouis

Description

@ChevalierLouis

Hello, I have tried ServoSmoothing from your video (nice video by the way) on my quadruped robot, but it didn't work

the max length of the robot is 16 cm but when I run the code the robot stay at a low height

I don't know how to solve this.

This is my code:

  Patte1 = z - patte1r - patte1p * -1 - leglx - legly * -1 - legyaw + 0.5;
  Patte2 = z - patte2r - patte2p * -1 - leglx + legly - legyaw + 0.5;
  Patte3 = z - patte3r * -1 + patte3p - leglx + legly - legyaw + 0.5;
  Patte4 = z - patte4r * -1 + patte4p - leglx - legly * -1 - legyaw + 0.5 ;

  Patte1smo = (Patte1 * 0.05) + (Patte1prev * 0.95);
  Patte2smo = (Patte2 * 0.05) + (Patte2prev * 0.95);
  Patte3smo = (Patte3 * 0.05) + (Patte3prev * 0.95);
  Patte4smo = (Patte4 * 0.05) + (Patte4prev * 0.95);

  distance( Patte1smo        , angletx         , 95 - (roll * 2) - anglety + angleyaw    , 1 );
  distance( Patte2smo        , angletx         , 90 - (roll * 2) - anglety + angleyaw    , 2 );
  distance( Patte3smo        , angletx         , 95 + (roll * 2) + anglety + angleyaw    , 3 );
  distance( Patte4smo        , angletx         , 85 + (roll * 2) + anglety + angleyaw    , 4 );

  //  distance( z - patte1r - patte1p * -1 - leglx - legly * -1 - legyaw + 0.5                   , angletx         , 95 - (roll * 2) - anglety + angleyaw    , 1 );
  //  distance( z - patte2r - patte2p * -1 - leglx + legly - legyaw + 0.5                        , angletx         , 90 - (roll * 2) - anglety + angleyaw    , 2 );
  //  distance( z - patte3r * -1 + patte3p - leglx + legly - legyaw + 0.5                        , angletx         , 95 + (roll * 2) + anglety + angleyaw    , 3 );
  //  distance( z - patte4r * -1 + patte4p - leglx - legly * -1 - legyaw + 0.5                   , angletx         , 85 + (roll * 2) + anglety + angleyaw    , 4 );
 
  Patte1prev = Patte1smo;
  Patte2prev = Patte2smo;
  Patte3prev = Patte3smo;
  Patte4prev = Patte4smo;

there is also the full code in the zip file in kinematics.cpp
robotV2.1.zip
(but the comments are in french)

maybe I have to use it on my commande ?
Have a nice day

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions