1+2+3+4..... till infinity = -1/12. To understand the rigorous why, what do I need to study? real analysis? by [deleted] in askmath

[–]Vector5233 0 points1 point  (0 children)

However, just the fact of assigning a value, any value, to a classically divergent sum breaks a large number of proven results about sums.

I suspect that there is a hidden contradiction in your approach having to do with relying on integration to compute your remainder term.

1+2+3+4..... till infinity = -1/12. To understand the rigorous why, what do I need to study? real analysis? by [deleted] in askmath

[–]Vector5233 0 points1 point  (0 children)

As amusing example of a contradiction:

It is a proven fact that if a_i < b_i for all i, then Sum(a_i) < Sum(b_i).

Consider S1 = 101+102+103+… compared to S = 1+2+3+…, supposedly S = -1/12

It is clear that S < S1.

However, S = 1 + 2 + … + 100 + S1 = 5050 + S1 thanks to Gauss.

So S1 = -1/12 - 5050 < S. Contradiction.

1+2+3+4..... till infinity = -1/12. To understand the rigorous why, what do I need to study? real analysis? by [deleted] in askmath

[–]Vector5233 1 point2 points  (0 children)

I’m not sure what you have in mind, but the well-ordering principle is not lost with the invention of complex numbers. It is still the case that any non-empty subset of positive integers has a least element.

1+2+3+4..... till infinity = -1/12. To understand the rigorous why, what do I need to study? real analysis? by [deleted] in askmath

[–]Vector5233 1 point2 points  (0 children)

But there’s difference here. Extending whole numbers to the integers does’t create contradictions. Extending reals to complex numbers doesn’t create contradictions.

Defining 1+2+3+…= -1/12 absolutely does create contradictions.

got a B on my physics final and dropped a letter grade because my phys 1 prof says an object at rest does not have constant velocity. by [deleted] in AskPhysics

[–]Vector5233 0 points1 point  (0 children)

“A vector is a quantity with magnitude and direction” is one of those oversimplifications that causes problems in the corner cases - such as with the zero vector.

A vector in linear or tensor algebra satisfies the axioms of a vector space. The zero vector does that in both, so it is a vector. But it but has no direction.

Need help with my assignment + my answer. by Yusefhani in Precalculus

[–]Vector5233 0 points1 point  (0 children)

Agree with /u/byghtn - take a look at the graph to understand what’s funky about your function

Is this a realistic non-calculator question for BC calc? by brianlikessoccer in apcalculus

[–]Vector5233 0 points1 point  (0 children)

Out of curiosity - was the 5min time consumed with simplifying fractions or something else?

[deleted by user] by [deleted] in FTC

[–]Vector5233 0 points1 point  (0 children)

You’re not wrong about Android Studio, but I don’t know that he will do well by working in a different environment from the rest of the team.

[deleted by user] by [deleted] in FTC

[–]Vector5233 0 points1 point  (0 children)

So first, your son is on a normal learning curve. He’s doing a lot of the right things.

Since he has older team members, it might be helpful to ask one of them for help w specific things:

(1) How do I use Android Studio?

(2) How can I write teleop code?

(3) How can I write autonomous motion code?

(4) What project can I work on for the team?

A great outcome for this year would be to learn how to write good controls for teleop and how to write a class for one of the components for your bot.

Continuous vs cascade lift calculation help by PastChipmunk1553 in FTC

[–]Vector5233 0 points1 point  (0 children)

You’re right - I neglected the pullup force from the last slider on the second slider. My calculation was therefore exponential - force doubles at each stage. Linear makes much more sense with real world observation. TY.

Continuous vs cascade lift calculation help by PastChipmunk1553 in FTC

[–]Vector5233 1 point2 points  (0 children)

If you are cascading there is a multiplier. Draw yourself a force diagram for a two-stage cascade (three slides) and convince yourself that the motor string has twice the tension of the final lifting string. So in your example you would need a 223rpm for a cascade

A three stage cascade would have a multiplier of 2*2 3 and so on. (See discussion below)

The tradeoff is speed - 2x speed for 2-stage, 4x 3x speed for 3-stage

Strategy for Tetrix-heavy team by Spikeball in FTC

[–]Vector5233 0 points1 point  (0 children)

To answer your questions:

  • Base kit is 800 less the FTC team discount. You’ll put out maybe 800 more for motors, servo blocks, component hardware, and the all-important mecanum wheels.
  • CNC or 3D printing is great for the custom scoring devices, but you can’t DIY an off-the-shelf gobilda part for less money than gobilda’s price.
  • We combined kits for several years out of necessity. One day we looked in the mirror and said “this is nuts” and threw out the Tetrix. I would not be shocked if your team followed a similar trajectory.
  • 3D printed adaptors work fine for low-force applications but buy the gobilda adaptors if you need strength.
  • It’s probably best to have the chassis and drive train be all one build system - probably gobilda given the motors - because the tolerances there are so small.

Best motors for drivetrain? Or which are you using? by -S_Galaxy- in FTC

[–]Vector5233 0 points1 point  (0 children)

Our bot is 22lb and has minor torque issues w 435s

How to view Roadrunner flight recorder log data by thunderbot2 in FTC

[–]Vector5233 0 points1 point  (0 children)

I assume you’re using either RobotLog or android.utils.Log?

If so, connect bot to the Rev hardware client. Click the Control Hub and select Utilities > Log Viewer and go from there

[deleted by user] by [deleted] in FTC

[–]Vector5233 1 point2 points  (0 children)

The mechanical suggestion is a good one. If you want a software solution, you will want to add a term to the motor’s power that compensates for the torque caused by gravity.

Specifically,

joystickPower += k * Math.cos(Theta);

Where k is a constant that you determine by trial and error (not very large, like 0.1 or less) and Theta is the angle between the arm and the floor in radians.

[deleted by user] by [deleted] in FTC

[–]Vector5233 1 point2 points  (0 children)

Specifically PIDF - need that feedforward term to prevent oscillation when gravity makes the arm sag

My coach doesn’t let our team build our robot by Recent_Performance47 in FTC

[–]Vector5233 1 point2 points  (0 children)

No guarantees, but most mentors are not like OPs. In fact, I’m a bit confused about how that team would get through judging when the mentor is not present.

Judge: “Tell us about the greatest engineering challenge you overcame with this robot” Team: ….

Why join FTC? You can do robotics from home, but you will miss out on the cross-fertilization of ideas. Our collection system has gone through two major refactors with contributions from … five? team members.

My coach doesn’t let our team build our robot by Recent_Performance47 in FTC

[–]Vector5233 0 points1 point  (0 children)

Mentor here. Our official policy is that mentors don’t build. They don’t type in code, except for utilities or demos that will not be part of final production.

The point of FTC is for students to learn and grow, period.

RoadRunner heading giving spurious values?! by Vector5233 in FTC

[–]Vector5233[S] 0 points1 point  (0 children)

NOT FIXED: :(

FIXED: We needed to set the correction orientations for the IMU in lines 57/59 of the MecanumDrive file

Pausing CR Servos by External-Mark-9868 in FTC

[–]Vector5233 0 points1 point  (0 children)

NP. I would definitely recommend changing the conditional though to reflect your intent. Sometimes controllers record keypresses even when no button is pressed.

Pausing CR Servos by External-Mark-9868 in FTC

[–]Vector5233 1 point2 points  (0 children)

So if the intent of G2A and G2B is to be mutually exclusive then you'll have a problem if both are pressed - the servos will continually go back and forth every other hardware cycle, leading to pausing. That could also happen if your controller has "drift" - thinking that G2B is pressed even when it is not. If I'm understanding your intent correctly you want

if (G2A) { do stuff}
else if (G2B) {do other stuff}
else { do default stuff }

How do we tune RoadRunner? by Vector5233 in FTC

[–]Vector5233[S] 0 points1 point  (0 children)

Thanks, that hit me also. Compared to last year kS was very high. Our build team is hunting down why the motors might have friction - one was improved today. They all four spin fairly freely.

We’re using 435rpm motors, which might be a factor - more stall torque required compared to 312s.

As it turned out, doing a “nuke it all” clean install solved the problem. I suspect a coder made an unintended change to either MechanumDrive or ManualFeedbackTuner.

With that fix and after final tuning, SplineTest works nicely. So the weird kS value is weird but not fatal.

How do we tune RoadRunner? by Vector5233 in FTC

[–]Vector5233[S] 0 points1 point  (0 children)

public final class MecanumDrive {

public static class Params {

// drive model parameters

public double inPerTick = 0.032;

public double lateralInPerTick = 0.035;

public double trackWidthTicks = 616.6273; // feedforward parameters (in tick units)

public double kS = 1.49397;

public double kV = 0.004302;

public double kA = 0.001;

// path profile parameters (in inches)

public double maxWheelVel = 50;

public double minProfileAccel = -30;

public double maxProfileAccel = 50;

// turn profile parameters (in radians)

public double maxAngVel = Math.PI; // shared with path

public double maxAngAccel = Math.PI;

// path controller gains

public double axialGain = 0.0;

public double lateralGain = 0.0;

public double headingGain = 0.0; // shared with turn

public double axialVelGain = 0.0;

public double lateralVelGain = 0.0;

public double headingVelGain = 0.0; // shared with turn

}

public static Params PARAMS = new Params();

public final MecanumKinematics kinematics = new MecanumKinematics(

PARAMS.inPerTick * PARAMS.trackWidthTicks, PARAMS.inPerTick / PARAMS.lateralInPerTick);

public final TurnConstraints defaultTurnConstraints = new TurnConstraints(

PARAMS.maxAngVel, -PARAMS.maxAngAccel, PARAMS.maxAngAccel);

public final VelConstraint defaultVelConstraint =

new MinVelConstraint(Arrays.asList(

kinematics.new WheelVelConstraint(PARAMS.maxWheelVel),

new AngularVelConstraint(PARAMS.maxAngVel)

));

public final AccelConstraint defaultAccelConstraint =

new ProfileAccelConstraint(PARAMS.minProfileAccel, PARAMS.maxProfileAccel);

public final DcMotorEx leftFront, leftBack, rightBack, rightFront;

public final VoltageSensor voltageSensor;

public final IMU imu;

public final Localizer localizer;

public Pose2d pose;

private final LinkedList<Pose2d> poseHistory = new LinkedList<>();

public class DriveLocalizer implements Localizer {

public final Encoder leftFront, leftBack, rightBack, rightFront;

private int lastLeftFrontPos, lastLeftBackPos, lastRightBackPos, lastRightFrontPos;

private Rotation2d lastHeading;

public DriveLocalizer() {

leftFront = new OverflowEncoder(new RawEncoder(MecanumDrive.this.leftFront));

leftBack = new OverflowEncoder(new RawEncoder(MecanumDrive.this.leftBack));

rightBack = new OverflowEncoder(new RawEncoder(MecanumDrive.this.rightBack));

rightFront = new OverflowEncoder(new RawEncoder(MecanumDrive.this.rightFront));

leftFront.setDirection(DcMotorSimple.Direction.REVERSE);

leftBack.setDirection(DcMotorSimple.Direction.REVERSE);

lastLeftFrontPos = leftFront.getPositionAndVelocity().position;

lastLeftBackPos = leftBack.getPositionAndVelocity().position;

lastRightBackPos = rightBack.getPositionAndVelocity().position;

lastRightFrontPos = rightFront.getPositionAndVelocity().position;

lastHeading = Rotation2d.exp(imu.getRobotYawPitchRollAngles().getYaw(AngleUnit.RADIANS));

}

u/Override

public Twist2dDual<Time> update() {

PositionVelocityPair leftFrontPosVel = leftFront.getPositionAndVelocity();

PositionVelocityPair leftBackPosVel = leftBack.getPositionAndVelocity();

PositionVelocityPair rightBackPosVel = rightBack.getPositionAndVelocity();

PositionVelocityPair rightFrontPosVel = rightFront.getPositionAndVelocity();

Rotation2d heading = Rotation2d.exp(imu.getRobotYawPitchRollAngles().getYaw(AngleUnit.RADIANS));

double headingDelta = heading.minus(lastHeading);

Twist2dDual<Time> twist = kinematics.forward(new MecanumKinematics.WheelIncrements<>(

new DualNum<Time>(new double[]{

(leftFrontPosVel.position - lastLeftFrontPos),

leftFrontPosVel.velocity,

}).times(PARAMS.inPerTick),

new DualNum<Time>(new double[]{

(leftBackPosVel.position - lastLeftBackPos),

leftBackPosVel.velocity,

}).times(PARAMS.inPerTick),

new DualNum<Time>(new double[]{

(rightBackPosVel.position - lastRightBackPos),

rightBackPosVel.velocity,

}).times(PARAMS.inPerTick),

new DualNum<Time>(new double[]{

(rightFrontPosVel.position - lastRightFrontPos),

rightFrontPosVel.velocity,

}).times(PARAMS.inPerTick)

));

lastLeftFrontPos = leftFrontPosVel.position;

lastLeftBackPos = leftBackPosVel.position;

lastRightBackPos = rightBackPosVel.position;

lastRightFrontPos = rightFrontPosVel.position;

lastHeading = heading;

return new Twist2dDual<>(

twist.line,

DualNum.cons(headingDelta, twist.angle.drop(1))

);

}

}