@ericjanofski (ericjanofski) posted a new topic, subject "DifferentialDrive Right Side Inverted Plus Motion Profiling". It read:

   The DifferentialDrive negates the input on the right side of the drive so that the robot drives forward on both sides without having to do any -1 multiplications.
    
    This means the right side talons are driving forward with red leds.
    
    The problem is, when I use motion profiling, I am using non negated right side drive. If I use talon.setInverted(true) to flip the talon on the right, it corrects motion profiling, but the differential drive goes in circles. I'm setting setInverted in robot init. I believe that's where it needs to be set.
    
    I also don't see anywhere else I could just multiply by -1 to counter this issue. We drive with arcadeDrive(move, turn). the move isn't specific to left or right. We also are using talons to process the motion profile and I don't want to send one side a negative position velocity.
    
    Does this all make sense? Has anyone else overcome this without righting an alternative to the DifferentialDrive class?
    
    wpilib has written a setRightSideInverted(boolean) method into the class, but I think it's still in beta. Would like to know how to fix in the meatime.

So @Oblarg (Eli Barnett) replied

    The newest version of WPILib has a “setRightSideInverted” method for handling this.

@ericjanofski (ericjanofski) replied

    I'm not seeing that. I downloaded the most recent updates in Eclipse and restarted it. Then i tried to use drive.setRightSideInverted but the method isn't there.
    
    I see it here: https://github.com/wpilibsuite/allwpilib/blob/master/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/DifferentialDrive.java
    
    Not sure how to get the differentialdrive code with that method. Is this beta?
    
    Thank you!

Then @Peter_Johnson (Peter Johnson) said

    ericjanofski:
    
    > I'm not seeing that. I downloaded the most recent updates in Eclipse and restarted it. Then i tried to use drive.setRightSideInverted but the method isn't there.
    > 
    > I see it here: https://github.com/wpilibsuite/allwpilib/blob/master/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/DifferentialDrive.java
    > 
    > Not sure how to get the differentialdrive code with that method. Is this beta?
    
    Yes, that change was added in May, so it wasn't in the last 2018 release.

After which, @ericjanofski (ericjanofski) added

    This isn't as big of a deal as I thought. I was under the impression that talon.setInverted() had to be set in robotInit(). After finding that isn't the case, I can use talon.setInverted(true) on the right side during a motion profile.
    
    Once setRightSideInverted() is in the wpilib alpha, it'll be even simpler.

To which @system (system) replied

    


{'source': 'discourse', 'url': 'https://www.chiefdelphi.com/t/differentialdrive-right-side-inverted-plus-motion-profiling/167305', 'title': 'DifferentialDrive Right Side Inverted Plus Motion Profiling', 'views': 644, 'has_accepted_answer': False, 'word_count': 420, 'like_count': 0, 'reply_count': 3, 'participant_count': 3, 'posts': 6, 'tags': '', 'author': '@ericjanofski (ericjanofski)', 'participants': '@ericjanofski (ericjanofski), @Oblarg (Eli Barnett), @Peter_Johnson (Peter Johnson), @system (system)', 'image_url': [None], 'created_at': '2018-10-28T09:46:29.000Z', 'last_posted_at': '2020-01-05T10:34:15.163Z'}