Go to the documentation of this file.
15 #include <armarx/navigation/core/aron/Events.aron.generated.h>
26 return "mem.nav.events.";
42 std::lock_guard g{writeMutex};
47 if (not updateResult.allSuccess())
49 ARMARX_WARNING <<
"Failed to commit to memory: " << updateResult.allErrorMessages();
51 return updateResult.allSuccess();
57 std::lock_guard g{writeMutex};
62 if (not updateResult.success)
64 ARMARX_WARNING <<
"Failed to commit to memory: " << updateResult.errorMessage;
66 return updateResult.success;
72 return storeImpl<core::arondto::GlobalTrajectoryUpdatedEvent>(
79 return storeImpl<core::arondto::LocalTrajectoryUpdatedEvent>(
86 return storeImpl<core::arondto::GoalReachedEvent>(
93 return storeImpl<core::arondto::WaypointReachedEvent>(
100 return storeImpl<core::arondto::InternalErrorEvent>(
107 return storeImpl<core::arondto::GlobalPlanningFailedEvent>(
114 return storeImpl<core::arondto::LocalPlanningFailedEvent>(
121 return storeImpl<core::arondto::MovementStartedEvent>(
128 return storeImpl<core::arondto::UserAbortTriggeredEvent>(
135 return storeImpl<core::arondto::SafetyThrottlingTriggeredEvent>(
142 return storeImpl<core::arondto::SafetyStopTriggeredEvent>(
146 template <
typename AronEventT,
typename EventT>
148 Writer::storeImpl(
const EventT& event,
149 const std::string& eventName,
150 const std::string& clientID)
154 ARMARX_VERBOSE <<
"Storing event `" << eventName <<
"` in memory.";
167 const auto dto = core::toAron<AronEventT>(event);
170 element->setElementCopy(
"event", std::make_shared<aron::data::String>(eventName));
171 element->setElementCopy(
"data", dto.toAron());
173 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
const std::string GlobalTrajectoryUpdated
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.
Event describing that the local trajectory was updated.
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
Event describing that the global trajectory was updated.
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 std::string LocalTrajectoryUpdated
const armem::MemoryID MemoryID