Consistent PostCrashCalculation
Currently two collision events are being logged in the simulation output for the same collision. The first event is written by the dynamicsCollision module and the second one comes from the PostCrashCalculation. These two events should be consolidated into one event that includes the basic collision information as well as the post-crash calculations.
In case of a failing calculation of the post-crash parameters, the PostCrashCalculation module logs the following message in the openPASS console „PostCrashCalculation failed“. This should be removed.
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Tuan Duong Quang assigned to @jdobberstein
assigned to @jdobberstein
- Tuan Duong Quang added Collision Detection label
added Collision Detection label
- Tuan Duong Quang changed milestone to %Release v1.0.0
changed milestone to %Release v1.0.0
- Tuan Duong Quang set weight to 3
set weight to 3
- Reporter
Each event is published by the
ÈventNetwork
- independent of its type. https://gitlab.eclipse.org/eclipse/simopenpass/simopenpass/-/blob/main/sim/src/core/opSimulation/framework/eventNetwork.cpp#L51void EventNetwork::InsertEvent(std::shared_ptr<EventInterface> event) { events[event->GetCategory()].push_back(event); publisher.Publish(EventDefinitions::utils::GetAsString(event->GetCategory()), openpass::publisher::LogEntry::FromEvent(event)); }
In case of a collision, the
CollisionManipulator
gets theCollisionEvent
and inserts further parameters fromcrashInfo
https://gitlab.eclipse.org/eclipse/simopenpass/simopenpass/-/blob/main/sim/src/core/opSimulation/modules/Manipulator/CollisionManipulator.cpp#L99void CollisionManipulator::PublishCrash(const std::shared_ptr<openpass::events::CollisionEvent>& event, const CrashInfo& crashInfo) { auto logEntry = openpass::publisher::LogEntry::FromEvent(event); logEntry.name = "ExtendedCollisionInformation"; logEntry.parameter.insert({{"Velocity", crashInfo.postCrashDynamic1.GetVelocity()}, {"VelocityChange", crashInfo.postCrashDynamic1.GetVelocityChange()}, {"VelocityDirection", crashInfo.postCrashDynamic1.GetVelocityDirection()}, {"YawVelocity", crashInfo.postCrashDynamic1.GetYawVelocity()}, {"PointOfContactLocalX", crashInfo.postCrashDynamic1.GetPointOfContactLocal().x}, {"PointOfContactLocalY", crashInfo.postCrashDynamic1.GetPointOfContactLocal().y}, {"CollisionVelocity", crashInfo.postCrashDynamic1.GetCollisionVelocity()}, {"Sliding", crashInfo.postCrashDynamic1.GetSliding()}, {"OpponentVelocity", crashInfo.postCrashDynamic2.GetVelocity()}, {"OpponentVelocityChange", crashInfo.postCrashDynamic2.GetVelocityChange()}, {"OpponentVelocityDirection", crashInfo.postCrashDynamic2.GetVelocityDirection()}, {"OpponentYawVelocity", crashInfo.postCrashDynamic2.GetYawVelocity()}, {"OpponentPointOfContactLocalX", crashInfo.postCrashDynamic2.GetPointOfContactLocal().x}, {"OpponentPointOfContactLocalY", crashInfo.postCrashDynamic2.GetPointOfContactLocal().y}, {"OpponentCollisionVelocity", crashInfo.postCrashDynamic2.GetCollisionVelocity()}, {"OpponentSliding", crashInfo.postCrashDynamic2.GetSliding()}, {"OYA", crashInfo.angles.OYA}, {"HCPAo", crashInfo.angles.HCPAo}, {"OCPAo", crashInfo.angles.OCPAo}, {"HCPA", crashInfo.angles.HCPA}, {"OCPA", crashInfo.angles.OCPA}}); publisher->Publish(EventDefinitions::utils::GetAsString(event->GetCategory()), logEntry); }
Proposal:
if (EventType = "CollisionEvent") => skip
InsertEvent
& only publish data fromCollisionManipulator
which contains all data.The message in the console can be deleleted here:
{ std::cout << "PostCrash Calculation failed" << std::endl; }
- Contributor
@jdobberstein Jan will check if this is implemented with the new architecture.
- Simon Zipfel mentioned in merge request !157 (merged)
mentioned in merge request !157 (merged)
- Jan Dobberstein mentioned in merge request !159 (merged)
mentioned in merge request !159 (merged)
- Reinhard Biegel closed
closed