How to update states of data

18 views
Skip to first unread message

aloha....@gmail.com

unread,
Apr 11, 2022, 9:30:13 AM4/11/22
to ProjectChrono
Hello chrono user.

I want to restart the vehicle dynamics simulation using StateGather and StateScatter. 
Before restart, I correct the vehicle status using Stete Gatther.
        veh.GetSystem()->StateSetup(state_pos, state_vel, state_acc);
        veh.GetSystem()->StateGather(state_pos, state_vel, T);
        veh.GetSystem()->StateGatherAcceleration(state_acc);
        veh.GetSystem()->StateGatherReactions(state_reactions);

And after initialize WheeledVehicle, I callStateScatter.
    veh.GetSystem()->StateScatter(state_pos, state_vel, T, true);
    veh.GetSystem()->StateScatterAcceleration(state_acc);
    veh.GetSystem()->StateScatterReactions(state_reactions);

But result is broken the vehicle.
broken_restart_vehicle.jpg

 If I call StateScatter, do I need to call another function  as well?
Could you help me how to restart the vehicle simulation.

Best regards

Nomoto
Reply all
Reply to author
Forward
0 new messages