34#include <VisionX/interface/components/OpenPoseEstimationInterface.h>
35#include <VisionX/interface/components/RGBDImageProvider.h>
40#include <Image/IplImageAdaptor.h>
41#include <Image/PrimitivesDrawer.h>
45#include <SimoxUtility/json/json.hpp>
76 if (robotStateInterface)
83 ARMARX_ERROR <<
"RobotStateCompontent is not avaiable, 3D-Estimation will be deactivated!!";
142 ARMARX_INFO <<
"Starting OpenPoseEstimation -- 3D";
154 ARMARX_INFO <<
"Stopping OpenPoseEstimation -- 3D";
160 openPoseArVizLayer.
clear();
161 arviz.commit(openPoseArVizLayer);
168 using json = nlohmann::json;
170 json jsonView = json::parse(text.message);
173 long timestamp = jsonView[
"timestamp"].get<
long>();
174 json jsonValues = jsonView[
"values"];
179OpenPoseSimulation::run()
184 while (running2D && !runTask->isStopped())
188 long timeProvidedImage = IceUtil::Time::now().toMilliSeconds();
190 if (running3D && localRobot)
196 localRobot, robotStateInterface, timeProvidedImage);
203 listener2DPrx->report2DKeypoints({}, timeProvidedImage);
204 listener2DPrx->report2DKeypointsNormalized({}, timeProvidedImage);
207 listener3DPrx->report3DKeypoints({}, timeProvidedImage);
213 listener2DPrx->report2DKeypoints({}, timeProvidedImage);
214 listener2DPrx->report2DKeypointsNormalized({}, timeProvidedImage);
230 "CameraNodeName",
"DepthCamera",
"Name of the robot node for the input camera");
armarx::viz::Client arviz
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Property< PropertyType > getProperty(const std::string &name)
SpamFilterDataPtr deactivateSpam(float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
disables the logging for the current line for the given amount of seconds.
void offeringTopic(const std::string &name)
Registers a topic for retrival after initialization.
TopicProxyType getTopic(const std::string &name)
Returns a proxy of the specified topic.
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
OpenPoseSimulationPropertyDefinitions(std::string prefix)
void start3DPoseEstimation(const Ice::Current &=Ice::emptyCurrent) override
void onInitComponent() override
void stop(const Ice::Current &=Ice::emptyCurrent) override
void onDisconnectComponent() override
void start(const Ice::Current &=Ice::emptyCurrent) override
void stop3DPoseEstimation(const Ice::Current &=Ice::emptyCurrent) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onConnectComponent() override
void onMessage(const Texting::TextMessage &text, const Ice::Current &=Ice::emptyCurrent) override
void onExitComponent() override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
VirtualRobot::RobotPtr createLocalClone()
Clones the structure of this remote robot to a local instance.
static bool synchronizeLocalCloneToTimestamp(VirtualRobot::RobotPtr robot, RobotStateComponentInterfacePrx robotStatePrx, Ice::Long timestamp)
Synchronizes a local robot to a robot state at timestamp.
#define ARMARX_INFO
The normal logging level.
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
#define ARMARX_VERBOSE
The logging level for verbose information.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.