Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working on my robot #2

Open
ChevalierLouis opened this issue Sep 14, 2021 · 0 comments
Open

not working on my robot #2

ChevalierLouis opened this issue Sep 14, 2021 · 0 comments

Comments

@ChevalierLouis
Copy link

ChevalierLouis commented Sep 14, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant