Big Robots - How are you leveling?

My teams frame is fairly large relative to the rest of the field (138).

We’ve found that using the leveling or rate change approach isn’t great for us, as by the time we hit that, were going to the other side.
We corrected this by a simple drive back.

We’ve also experimented with odometry and a vision based system and that seems to work.

I’m just also curious if anyone has any approaches that they like?
Always looking to approve and vision potentially getting distorted by weird angles worries me a little…

For some teams leveling is as simple as just looking for the rate to change and stopping, maybe locking your wheels. For other teams it isn’t so simple!

1 Like

Both 3467 and 1591 use PID controllers which close the loop on gyro pitch for auto-balance, and we successfully used this strategy to help team 8626 tune their balance at Greater Boston. We’ve been big fans of this approach, and with some tuning this allows for extremely fast balance routines.

If you have a NavX or Pigeon2, we can provide a baseline set of PID constants for you to start with.

We first use a PathPlanner trajectory to get us near the center of the charge station with some assumed amount of wheelslip when breaking over the angle of the ramp, and then engage the balance routine once the path finishes.

There are many nuances to tuning a balance PID controller however:

  1. Use a small P gain so that the driving is just fast enough to overcome friction and move on the charge station, but slow enough that it won’t induce large oscillations.
  2. Use a D (derivative) gain so that the robot slows earlier as the angle rapidly changes toward zero.
  3. Use a WPILib MathUtil.clamp() to limit your drive’s maximum speed in this mode, which makes the PID Controller more akin to a bang-bang controller.




1 Like

Large/tall robot here. We perfected the auto balance this past weekend with the following algorithm:

  • drive at high speed to encoder setpoint “near” balance spot (we call it Ramming)
  • use Pigeon pitch angle to drive at a low speed toward balance point. If pitch rate is above a threshold, stop (position hold). If pitch is below a threshold and rate is also below a threshold, done.

Thanks for the reply. Yeah this is the same concept I was talking about lol. I will say though 1591 looks like it has a fairly higher CG

1 Like

interesting, so your trying to detect if your starting to swing up and then stop?

I guess I just always thought of it the other way!

It may seem that way, but it’s actually quite low. Some rough testing puts our tip angle at 70 degrees, and it definitely came in handy here when our bumpers caught the fabric exiting the charge station in FLR upper bracket finals:

Not leveling related, but as a big bot we had trouble making room for two more. Driving off the edge would result in our robot sliding off the CS. We added a compressible material under the side frames, with a “snakeskin” material on the bottom of that. Solid as a rock now!

1 Like

The way that I was able to level my robot is by checking to see when we were near the top of the charge station (you could use gyro to measure this), and then rotating the robot 90°. As a KOP tank chassis, using this would guarantee at least a dock, and would be effectively a brake.

We noticed in data traces that pitch with the NavX was 13.5-14 for our robot while climbing. We used bang bang control and just set the motors to 0 if pitch went below 12, basically right when we could detect movement. Our robot was quite tall and heavy but this worked nicely. It did require us to be going slowly.

I know several teams used PID. This isn’t a great application for PID because of its non-linear nature. I’m sure you could get it to work but not every nail needs the PID hammer.

1 Like

yeah I haven’t noticed a ton of benefit of pid but its probably a robot by robot thing.

Interesting, i need to go review some logs, seems by the time we are tipping its too late

We had to be going slowly.

Not ideal but we successfully tested it for the first time in competition this Saturday. It worked perfectly in our last 4 matches. Earlier tests finally got us the data we needed but we didn’t actually see a successful balance until it counted.

1 Like

Understandable! yeah we can level perfectly fine as it is, but we go slow and I’m trying to find that speed!

We did the same thing but implemented it in teleop. It was actually quite funny to have some teams come up to us for strategy planning and say “oh, we’re all swerve, so we can–” “actually, no we aren’t, we just have a zero turn on our tank drive controls” lol. Our driver even used it to avoid defense in some matches, and admittedly it does look like swerve in some altercations.

We were not heavy or overweight by any means, though. 80lb with a very low CG. We had the opposite issue where we were concerned we couldn’t push the charge station one way or the other with heavier alliance members, so we always climbed first and let everybody else level it out.

Our robot is just below max weight and about 48" tall. The auto balance routine checks the gyro for greater than 10 degree tilt in either direction and will drive the robot at quarter speed (~1 m/s) until the angle drops back below 10 degrees and then we lock the wheels into the rotating position so it doesn’t roll off.

1 Like