25#include <SimoxUtility/json.h>
32 "MemoryToDebugObserver");
44 armem::MemoryID robotEntityId{
"RobotState",
"Proprioception",
"Armar7",
"Armar7"};
46 std::vector<std::string> jointNames{
48 "Neck_2_Hemisphere_A",
49 "Neck_3_Hemisphere_B",
52 for (
const std::string& jointName : jointNames)
54 std::vector<std::string> attributes{
64 for (
const std::string& attribute : attributes)
66 properties.memoryToDebugObserver.plottedValues.push_back({
67 .entityID = robotEntityId,
68 .aronPath = {{
"joints", attribute, jointName}},
70 properties.memoryToDebugObserver.plottedValues.push_back({
71 .entityID = robotEntityId,
72 .aronPath = {{
"extraLongs", jointName +
".absoluteEncoderTicks"}},
77 simox::json::json j = properties.memoryToDebugObserver;
78 properties.memoryToDebugObserverJson = j.dump();
80 defs->optional(properties.memoryToDebugObserverJson,
81 "p.memoryToDebugObserverJson",
82 "Configuration of MemoryToDebugObserver in JSON format.");
84 defs->optional(properties.pollFrequencyHz,
"p.pollFrequencyHz");
96 return "MemoryToDebugObserver";
105 simox::json::json j = simox::json::json::parse(properties.memoryToDebugObserverJson);
106 j.get_to(properties.memoryToDebugObserver);
140 properties.memoryToDebugObserver, services};
144 while (task and not task->isStopped())
146 memoryToDebugObserver.pollOnce();
157 tab.group.setLabel(
"Todo ...");
166 if (tab.rebuild.exchange(
false))
#define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName)
Default component property definition container.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
plugins::DebugObserverComponentPlugin & getDebugObserverComponentPlugin()
void setDebugObserverBatchModeEnabled(bool enable)
static Frequency Hertz(std::int64_t hertz)
std::string getName() const
Retrieve name of object.
MemoryNameSystem & memoryNameSystem()
Transfers data from memory servers to the DebugObserver.
Simple rate limiter for use in loops to maintain a certain frequency given a clock.
Duration waitForNextTick() const
Wait and block until the target period is met.
Implementation of MemoryToDebugObserver.
void onInitComponent() override
Pure virtual hook for the subclass.
void onDisconnectComponent() override
Hook for subclass.
void RemoteGui_update() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onConnectComponent() override
Pure virtual hook for the subclass.
void onExitComponent() override
Hook for subclass.
void createRemoteGuiTab()
std::string getDefaultName() const override
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
void RemoteGui_startRunningTask()
void RemoteGui_createTab(std::string const &name, RemoteGui::Client::Widget const &rootWidget, RemoteGui::Client::Tab *tab)