Why does a chassis stall? Does wiring have an effect? Can a pid loop help and how? Please post of solutions you have to stop a drive from stalling.

A drivetrain stalls when you draw too much current and trip the PTCs in a motor. Wiring can help, but the problem is primarily mechanical (not enough torque). Slew code can help reduce current draw while speeding up, but this often isn’t enough. PID can’t help you here. Really the only permanent fix is to change a gear ratio on the drive.

Or add more motors, or perhaps fix unnecessary friction in some place.

Or ram into walls less.

Stalling means that the motors on your drivetrain have been subject to too much torque for the motors to handle.

The more torque demanded of the motor, the more current it draws. The more current a motor draws, the more it heats up. There’s an internal PTC that protects the motors from burning out. The PTC’s electrical resistance varies with temperature, but there’s a catch: when the current gets too high, the temperature of the PTC passes a critical point (the PTC “trips”) and the PTC puts out so much resistance that it blocks the current. That is why your motors stall. Don’t take out the PTC though, because it’s there to protect the motors from permanently damaging themselves by burning out.

The most direct fix to this is to increase the amount of torque your motors can give out. This can be done by re-gearing your motors internally or externally, or a combination of both. You can also try adding more motors to the drivetrain if you can, reducing the weight of the robot itself, and checking your wheel axle setups for excess friction. Also try not to push against walls, fences and star clumps for too long.