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();
57 std::lock_guard g{writeMutex};
62 if (not updateResult.success)
64 ARMARX_WARNING <<
"Failed to commit to memory: " << updateResult.errorMessage;
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)
152 static_assert(std::is_base_of<core::Event, EventT>::value,
"Only events supported.");
170 element->setElementCopy(
"event", std::make_shared<aron::data::String>(eventName));
171 element->setElementCopy(
"data", dto.toAron());
173 update.instancesData = {element};
175 return store(update);
MemoryID withProviderSegmentName(const std::string &name) const
MemoryID withCoreSegmentName(const std::string &name) const
MemoryID withMemoryName(const std::string &name) const
MemoryID withEntityName(const std::string &name) const
MemoryID withTimestamp(Time time) const
CommitResult commit(const Commit &commit) const
Writes a Commit to the memory.
const Properties & properties() const
armem::client::Writer & memoryWriter()
std::string propertyPrefix() const override
Properties defaultProperties() const override
bool store(const core::GoalReachedEvent &event, const std::string &clientID)
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
#define ARMARX_VERBOSE
The logging level for verbose information.
std::shared_ptr< Dict > DictPtr
const std::string SafetyStopTriggered
const std::string GoalReached
const std::string SafetyThrottlingTriggered
const std::string UserAbortTriggered
const std::string LocalTrajectoryUpdated
const std::string MovementStarted
const std::string WaypointReached
const std::string GlobalTrajectoryUpdated
const std::string GlobalPlanningFailed
const std::string InternalError
const std::string LocalPlanningFailed
void toAron(arondto::GlobalTrajectoryPoint &dto, const GlobalTrajectoryPoint &bo)
This file is part of ArmarX.
constexpr const char * EventsCoreSegmentName
constexpr const char * NavigationMemoryName
A bundle of updates to be sent to the memory.
Result of an EntityUpdate.
An update of an entity for a specific point in time.
Event describing that the global trajectory was updated.
Event describing that the targeted goal was successfully reached.
Event describing the occurance of an internal unhandled error.
Event describing that the local trajectory was updated.
Event describing that for security reasons, the robot was stopped completely.
Event desciribing that a significant safety throttling factor was reached.
Event describing that the user aborted the current execution.
Event describing that a user-defined waypoint was successfully reached.