Go to the documentation of this file.
38 def->optional(properties.visualization,
"Visualization");
39 def->optional(properties.resizeOBBFactor,
"ResizeOBBFactor");
46 filter.setNegative(
true);
53 enableResultPointClouds<PointT>(
getName() +
"Result");
54 enableResultPointClouds<PointT>(
getName() +
"RemovedObjects");
76 pcl::PointCloud<PointT>::Ptr inputCloud(
new pcl::PointCloud<PointT>());
77 pcl::PointCloud<PointT>::Ptr removedObjects(
new pcl::PointCloud<PointT>());
85 ARMARX_VERBOSE <<
"Timeout or error while waiting for point cloud data.";
91 std::vector<std::string> objects_removed;
98 if (!objectPose.oobbGlobal().has_value())
105 std::string
s = objectPose.objectID.str();
108 return std::tolower(c); });
110 if(
s.find(
"building") != std::string::npos)
115 if(
s.find(
"interior") != std::string::npos)
120 if(
s.find(
"workbench") != std::string::npos)
126 objects_removed.push_back(objectPose.objectID.str());
130 const simox::OrientedBoxf localOOBB = objectPose.localOOBB.value();
132 Eigen::Vector3f dim = localOOBB.dimensions();
133 dim += Eigen::Vector3f::Ones() * properties.resizeOBBFactor;
135 Eigen::Vector3f maxPt = dim / 2.0;
136 Eigen::Vector3f minPt = -1.0 * maxPt;
142 filter.setTransform(
transform.inverse());
143 filter.setMin(Eigen::Vector4f(minPt.x(), minPt.y(), minPt.z(), 1.0));
144 filter.setMax(Eigen::Vector4f(maxPt.x(), maxPt.y(), maxPt.z(), 1.0));
146 filter.setInputCloud(inputCloud);
148 filter.setNegative(
false);
149 pcl::PointCloud<PointT>::Ptr object(
new pcl::PointCloud<PointT>());
150 filter.filter(*
object);
151 (*removedObjects) += (*object);
153 filter.setNegative(
true);
154 filter.filter(*inputCloud);
156 if (properties.visualization)
161 b.
color(simox::Color::blue(128, 128));
170 if (properties.visualization)
191 grid.
add(tab.extractGrasps, {row, 0}, {2, 1});
CommitResult commit(StagedCommit const &commit)
Brief description of class FilterKnownObjects.
void onInitPointCloudProcessor() override
GridLayout & add(Widget const &child, Pos pos, Span span=Span{1, 1})
void RemoteGui_update() override
After calling RemoteGui_startRunningTask, this function is called periodically in a separate thread.
void add(ElementT const &element)
std::string getDefaultName() const override
armarx_add_component(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore ${Boost_LIBRARIES} SOURCES ExternalApplicationManager.cpp ExternalApplicationManagerStarter.cpp ExternalApplicationManagerDependency.cpp HEADERS ExternalApplicationManager.h ExternalApplicationManagerStarter.h ExternalApplicationManagerDependency.h) target_include_directories(ExternalApplicationManager PUBLIC $
void provideResultPointClouds(const PointCloudPtrT &pointClouds, std::string providerName="")
sends result PointClouds for visualization
ARMARX_REGISTER_COMPONENT_EXECUTABLE(RemoteGuiExample2, RemoteGuiExample2::GetDefaultName())
void createRemoteGuiTab()
This function should be called once in onConnect() or when you need to re-create the Remote GUI tab.
bool waitForPointClouds(int milliseconds=1000)
Wait for new PointClouds.
Properties of PointCloudProcessor.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
int getPointClouds(const PointCloudPtrT &pointCloudPtr)
Poll PointClouds from provider.
void RemoteGui_startRunningTask()
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
void onDisconnectPointCloudProcessor() override
MatrixXX< 4, 4, float > Matrix4f
DerivedT & pose(Eigen::Matrix4f const &pose)
armarx::viz::Client arviz
void RemoteGui_createTab(std::string const &name, RemoteGui::Client::Widget const &rootWidget, RemoteGui::Client::Tab *tab)
auto transform(const Container< InputT, Alloc > &in, OutputT(*func)(InputT const &)) -> Container< OutputT, typename std::allocator_traits< Alloc >::template rebind_alloc< OutputT > >
Convenience function (with less typing) to transform a container of type InputT into the same contain...
Box & size(Eigen::Vector3f const &s)
DerivedT & color(Color color)
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.
std::string getName() const
Retrieve name of object.
Layer layer(std::string const &name) const
static std::string GetDefaultName()
double s(double t, double s0, double v0, double a0, double j)
This file offers overloads of toIce() and fromIce() functions for STL container types.
void onConnectPointCloudProcessor() override
An object pose as stored by the ObjectPoseStorage.
objpose::ObjectPoseSeq getObjectPoses()
void onExitPointCloudProcessor() override