Distributor

Steering reversed?

Hi

I am in the process of building a rover with a 6WD Dagu platform and Pixhawk.

I put it together and noticed the following:

In manual mode - driving forward or backwards is fine

In manual mode - while driving forward the steering is fine

In manual mode - while driving backwards the steering is reversed

Before I installed the Pixhawk I used the "skid steering" mixer function of the motor controller to try out the platform - the steering was fine (the way I expected it to be).

Now I use the Pixhawk to do the skid steering mixing (enabled in the parameters) - but it is different while driving backwards than before (without Pixhawk).

Is this correct? Does the Pixhawk handle steering while driving backwards different?

hoping for some enlightenment :)

Felix

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Nevermind, I think I have it figured out.

  • Thanks!

    Hmm, I can't verify/compile. I get;


    RCmode.ino: In function 'void RCmode()':
    RCmode:5: error: 'RCspeedpin' was not declared in this scope
    RCmode:6: error: 'RCsteerpin' was not declared in this scope
    RCmode:11: error: 'RCdeadband' was not declared in this scope
    RCmode:12: error: 'RCdeadband' was not declared in this scope
    RCmode:18: error: 'lmspeed' was not declared in this scope
    RCmode:19: error: 'rmspeed' was not declared in this scope
    RCmode:26: error: 'Motors' was not declared in this scope

    Any suggestions?

    Thanks

  • Were you by chance using the T'rex motor controller? If so, how did you disable skid steering? I am looking at the RC Mode INO but can figure out what needs to be changed.

    Thanks

    • Distributor

      Yes - I am using the T-Rex controller,

      I did the following:

      void RCmode()
      {
      //------------------------------------------------------------ Code for RC inputs ---------------------------------------------------------

      int Speed=int(pulseIn(RCspeedpin,HIGH,25000)); // read throttle/left stick
      int Steer=int(pulseIn(RCsteerpin,HIGH,25000)); // read steering/right stick

      if (Speed==0) Speed=1500; // if pulseIn times out (25mS) then set speed to stop
      if (Steer==0) Steer=1500; // if pulseIn times out (25mS) then set steer to centre

      if (abs(Speed-1500)<RCdeadband) Speed=1500; // if Speed input is within deadband set to 1500 (1500uS=center position for most servos)
      if (abs(Steer-1500)<RCdeadband) Steer=1500; // if Steer input is within deadband set to 1500 (1500uS=center position for most servos)

      //Steer=Steer-1500;
      //lmspeed=(Speed-Steer-1500)*8/10;
      //rmspeed=(Speed+Steer-1500)*8/10;

      lmspeed=Speed-1500;
      rmspeed=Steer-1500;

      if(lmspeed<-255) lmspeed=-255;
      if(lmspeed>255) lmspeed=255;
      if(rmspeed<-255) rmspeed=-255;
      if(rmspeed>255) rmspeed=255;

      Motors();
      }

  • MR60

    Hi Felix,

    I configured mine as follows, but am using the sabertooth controller instead of the T-Rex (was less expensive :)

    -Skid_steer_output set to 1 in parameters list

    -Skid_steer_input left disabled (0)

    -Sabertooth controller is set so that the left motors and right motors are controlled independently by Pixhawk (so no mixing, no skid steerring activated in the sabertooth controller)

    -All left motors + cables soldered together, all left motors - cables soldered together. All right motors + cables soldered together, all right - motors soldered together.

    In such a way your left motors are seen as one single track and right motors are seen as one single track.

    So the controller controls the spinning direction of, in fact, each of the two tracks. You should have two motors output on your controller : one output is a red and black cable for each track (two tracks, two outputs). You have to make sure that the spinning direction is the same for each track when applying the same PWM signal on the two S1 and S2 controller's inputs. If tracks are moving in opposite direction, you have to swap one fo the track's red and black cables at one of the two outputs.

    I'm not sure it is clear but I hope so...

    • Distributor

      Hi Hugues,

      thank you very much for your answer.

      That's exactly what I did.

      But I observe the following:

      a) driving only with an RC receiver, using the skid steering function of the motor controller:

      - stick forward => rover drives forward (ok)

      - stick backwards => rover drives backwards (ok)

      - stick to the front and left => rover drives forward left turn (ok)

      - stick to the front and right => rover drives forward right turn (ok)

      - stick to the back and left => rover drives backwards left turn (ok)

      - stick to the back and right => rover drives backwards right turn (ok)

      b) driving only with the Pixhawk, skid steering function of the motor controller is deactivated, skid steering function in the Pixhawk is activated (cabling changed accordingly)

      - stick forward => rover drives forward (ok)

      - stick backwards => rover drives backwards (ok)

      - stick to the front and left => rover drives forward left turn (ok)

      - stick to the front and right => rover drives forward right turn (ok)

      - stick to the back and left => rover drives backwards RIGHT turn (???)

      - stick to the back and right => rover drives backwards LEFT turn (???)

      do you observe the same?

      • MR60

        Hi Felix,

        With mine:

        - stick to the back and left => rover nose goes left (butt goes right)

        -- stick to the back and right => rover nose goes right (butt goes left)

        That seems logical to me.

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…