Hi Gerald, While adding support for direct drive motors in Chrono::Vehicle is on my todo list, this is not currently available.
Having said that, this setup can still be accommodated with a bit of a workaround: 1. First disconnect the existing driveline: once you construct your Chrono vehicle model (either from a set of JSON specification files or using one pre-defined in the vehicle models library), simply call the function ChTrackedVehicle::DisconnectDriveline() to do that. 2. You must then apply the desired torques to the sprockets. You can do this at the same time you “synchronize” the vehicle system at any time step. You can invoke your (electric) motor models to get the torques they produce and then apply it to the corresponding sprocket shafts (which you can access through the vehicle->track assembly->sprocket->axle). For an example on how to apply the torque to these shafts, see for example the implementation of ChSimpleDriveline (lines 122-123<https://github.com/projectchrono/chrono/blob/22b5fc74dee5643ce2d6e4c85a811d518eccb34f/src/chrono_vehicle/wheeled_vehicle/driveline/ChSimpleDriveline.cpp#L122>). This approach (albeit for a slightly different purpose) is implemented in the Chrono::Vehicle co-simulation framework when attaching a drawbar pull rig to a (tracked) vehicle. Look at the implementation of ChVehicleCosimTrackedVehicleNode::OnInitializeDBPRig<https://github.com/projectchrono/chrono/blob/afc19b23163cff20ab7fac81112f9e73923949a0/src/chrono_vehicle/cosim/mbs/ChVehicleCosimTrackedVehicleNode.cpp#L153> and of TrackedVehicleDBPDriver<https://github.com/projectchrono/chrono/blob/afc19b23163cff20ab7fac81112f9e73923949a0/src/chrono_vehicle/cosim/mbs/ChVehicleCosimTrackedVehicleNode.cpp#L44>. --Radu From: [email protected] <[email protected]> On Behalf Of Gerald Gattringer Sent: Monday, March 13, 2023 9:29 AM To: ProjectChrono <[email protected]> Subject: [chrono] Tracked vehicle direct motor control hello, for the simulation of a tracked vehicle I need to control the motors directly. I.e. I need to control the target RPM (or throttle) per motor (left/right) instead of direction+throttle. I'd appreciate some help on how i'd be able to achieve this! Thanks. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/7ef8e57e-dd01-486e-b5cb-e0caf0fb5c6en%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/7ef8e57e-dd01-486e-b5cb-e0caf0fb5c6en%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/PH0PR06MB823758FA1BC3EE32920251BCA7899%40PH0PR06MB8237.namprd06.prod.outlook.com.
