Go to the documentation of this file.
39 def->optional(properties.visualization,
"Visualization");
40 def->optional(properties.resizeOBBFactor,
"ResizeOBBFactor");
47 filter.setNegative(
true);
54 enableResultPointClouds<PointT>(
getName() +
"Result");
55 enableResultPointClouds<PointT>(
getName() +
"RemovedObjects");
77 pcl::PointCloud<PointT>::Ptr inputCloud(
new pcl::PointCloud<PointT>());
78 pcl::PointCloud<PointT>::Ptr removedObjects(
new pcl::PointCloud<PointT>());
86 ARMARX_VERBOSE <<
"Timeout or error while waiting for point cloud data.";
92 std::vector<std::string> objects_removed;
99 if (!objectPose.oobbGlobal().has_value())
106 std::string
s = objectPose.objectID.str();
109 s.begin(),
s.end(),
s.begin(), [](
unsigned char c) { return std::tolower(c); });
111 if (
s.find(
"building") != std::string::npos)
116 if (
s.find(
"interior") != std::string::npos)
121 if (
s.find(
"workbench") != std::string::npos)
127 objects_removed.push_back(objectPose.objectID.str());
131 const simox::OrientedBoxf localOOBB = objectPose.localOOBB.value();
133 Eigen::Vector3f dim = localOOBB.dimensions();
134 dim += Eigen::Vector3f::Ones() * properties.resizeOBBFactor;
136 Eigen::Vector3f maxPt = dim / 2.0;
137 Eigen::Vector3f minPt = -1.0 * maxPt;
143 filter.setTransform(
transform.inverse());
144 filter.setMin(Eigen::Vector4f(minPt.x(), minPt.y(), minPt.z(), 1.0));
145 filter.setMax(Eigen::Vector4f(maxPt.x(), maxPt.y(), maxPt.z(), 1.0));
147 filter.setInputCloud(inputCloud);
149 filter.setNegative(
false);
150 pcl::PointCloud<PointT>::Ptr object(
new pcl::PointCloud<PointT>());
151 filter.filter(*
object);
152 (*removedObjects) += (*object);
154 filter.setNegative(
true);
155 filter.filter(*inputCloud);
157 if (properties.visualization)
162 b.
color(simox::Color::blue(128, 128));
170 <<
" from point cloud";
172 if (properties.visualization)
193 grid.
add(tab.extractGrasps, {row, 0}, {2, 1});
CommitResult commit(StagedCommit const &commit)
Brief description of class FilterKnownObjects.
void onInitPointCloudProcessor() override
MatrixXX< 4, 4, float > Matrix4f
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.
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...
void RemoteGui_startRunningTask()
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
void onDisconnectPointCloudProcessor() override
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)
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