Go to the documentation of this file.
9 #include <armarx/navigation/core/aron/Events.aron.generated.h>
20 return "mem.nav.events.";
37 std::lock_guard g{writeMutex};
42 if (not updateResult.allSuccess())
44 ARMARX_WARNING <<
"Failed to commit to memory: " << updateResult.allErrorMessages();
46 return updateResult.allSuccess();
52 std::lock_guard g{writeMutex};
57 if (not updateResult.success)
59 ARMARX_WARNING <<
"Failed to commit to memory: " << updateResult.errorMessage;
61 return updateResult.success;
67 return storeImpl<core::arondto::GoalReachedEvent>(
74 return storeImpl<core::arondto::WaypointReachedEvent>(
81 return storeImpl<core::arondto::InternalErrorEvent>(
88 return storeImpl<core::arondto::GlobalPlanningFailedEvent>(
95 return storeImpl<core::arondto::LocalPlanningFailedEvent>(
103 return storeImpl<core::arondto::MovementStartedEvent>(
110 return storeImpl<core::arondto::UserAbortTriggeredEvent>(
117 return storeImpl<core::arondto::SafetyThrottlingTriggeredEvent>(
124 return storeImpl<core::arondto::SafetyStopTriggeredEvent>(
129 template <
typename AronEventT,
typename EventT>
131 Writer::storeImpl(
const EventT& event,
132 const std::string& eventName,
133 const std::string& clientID)
137 ARMARX_INFO <<
"Storing event `" << eventName <<
"` in memory.";
139 const auto& timestamp =
event.timestamp;
148 update.referencedTime = timestamp;
150 const auto dto = core::toAron<AronEventT>(event);
153 element->setElementCopy(
"event", std::make_shared<aron::data::String>(eventName));
154 element->setElementCopy(
"data", dto.toAron());
156 update.instancesData = {element};
const std::string MovementStarted
MemoryID withMemoryName(const std::string &name) const
A bundle of updates to be sent to the memory.
Result of an EntityUpdate.
Event describing the occurance of an internal unhandled error.
Event desciribing that a significant safety throttling factor was reached.
const std::string UserAbortTriggered
const std::string NavigationMemoryName
const std::string WaypointReached
bool store(const core::GoalReachedEvent &event, const std::string &clientID)
const std::string SafetyStopTriggered
const std::string SafetyThrottlingTriggered
MemoryID withProviderSegmentName(const std::string &name) const
std::shared_ptr< Value > value()
const std::string GlobalPlanningFailed
armem::client::Writer & memoryWriter()
MemoryID withCoreSegmentName(const std::string &name) const
Event describing that for security reasons, the robot was stopped completely.
An update of an entity for a specific point in time.
Event describing that the user aborted the current execution.
CommitResult commit(const Commit &commit) const
Writes a Commit to the memory.
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Event describing that the targeted goal was successfully reached.
const std::string EventsCoreSegmentName
const std::string GoalReached
const std::string InternalError
Properties defaultProperties() const override
std::shared_ptr< Dict > DictPtr
std::string propertyPrefix() const override
MemoryID withEntityName(const std::string &name) const
const std::string memoryName
const Properties & properties() const
MemoryID withTimestamp(Time time) const
Event describing that a user-defined waypoint was successfully reached.
This file is part of ArmarX.
const std::string LocalPlanningFailed
const armem::MemoryID MemoryID