-
Notifications
You must be signed in to change notification settings - Fork 530
Description
Environment
- Chrono version: 9.0.1
- OS: Ubuntu 22.04
- (Compiler: GCC on Ubuntu 22.04 — default toolchain)
Summary
I’m implementing a custom wheel-torque controller for a wheeled vehicle. Chrono doesn’t seem to provide a built-in API for direct wheel torque control on the spindle, so I apply torque manually to the wheel spindle. The issue: even a very small torque input produces a very large longitudinal acceleration of the whole vehicle. In a real passenger car, you’d typically need on the order of 200–300 Nm (at the wheels) to see strong acceleration, but here tiny torques already result in rapid acceleration.
Minimal Reproducer
This helper is called for a given axle/side (HMMWV-like vehicle; wheel radius ≈ 0.47 m). It prints the spindle inertia once and applies torque about the local Y axis.
static void ApplyWheelTorque(chrono::vehicle::ChWheeledVehicle& veh,
int axle,
chrono::vehicle::VehicleSide side,
double torque) {
auto suspension = veh.GetSuspension(axle);
if (!suspension) return;
auto spindle = suspension->GetSpindle(side);
if (!spindle) return;
// Assumed tire radius (HMMWV ~0.47 m)
const double wheel_radius = 0.47;
// Print spindle inertia once
static bool printed = false;
if (!printed) {
auto inertia = spindle->GetInertia();
std::cout << "Spindle inertia: " << inertia << std::endl;
printed = true;
}
// Frame (not used further here, but shown for context)
const auto& fr = spindle->GetFrameRefToAbs();
// Apply torque about local Y (wheel axle) direction
chrono::ChVector3d axis_local(0, 1, 0);
spindle->AccumulateTorque(0u, axis_local * torque, true);
}
How I use it
- I call ApplyWheelTorque(...) once per simulation step with a small positive torque (for testing).
- Vehicle module: standard wheeled vehicle with tires; otherwise default setup.
Expected behavior
Small torques (a few N·m) should not produce large longitudinal acceleration of the entire vehicle.
Actual behavior
Even very small torques result in a rapid increase in vehicle speed (unrealistically high acceleration).
Questions
- In the chrono::vehicle architecture, is it recommended to drive the wheels via the powertrain → driveline interfaces rather than applying torque directly to the spindle with AccumulateTorque?
- If applying torque directly to the spindle is acceptable, are there best-practice requirements around the use of AccumulateTorque—for example, clearing an accumulator every step—so that torque doesn’t effectively “stack up” frame to frame?
- Are there known pitfalls related to coordinate frames for the spindle axis (e.g., ensuring the local Y axis is the correct rotation axis for a given suspension), tire model parameters (longitudinal stiffness, friction), or solver/timestep settings that could cause this “small torque → huge acceleration” effect?
Additional notes
Wheel radius is assumed ~0.47 m (HMMWV-style).
I can provide logs (vehicle speed/acceleration vs. time, wheel angular speed/slip, tire forces/normal load) and a small repro project if helpful.
Thanks for any guidance!