36 #ifndef JSK_PCL_ROS_SELF_MASK_NAMED_LINK_H_ 37 #define JSK_PCL_ROS_SELF_MASK_NAMED_LINK_H_ 39 #include <robot_self_filter/self_mask.h> 51 : SelfMask<
pcl::PointXYZ>(tf, links),
63 const unsigned int bs = bodies_.size();
66 for (
unsigned int i = 0 ; i < bs ; ++i) {
69 ROS_ERROR(
"WaitForTransform timed out from %s to %s after 100ms. Error string: %s", (
tf_prefix_+bodies_[i].name).c_str(), header.frame_id.c_str(), err.c_str());
74 tf_.lookupTransform(header.frame_id,
tf_prefix_+bodies_[i].name, header.stamp, transf);
79 ROS_ERROR(
"Unable to lookup transform from %s to %s. Exception: %s", (
tf_prefix_+bodies_[i].name).c_str(), header.frame_id.c_str(), ex.what());
84 bodies_[i].body->setPose(transf * bodies_[i].constTransf);
85 bodies_[i].unscaledBody->setPose(transf * bodies_[i].constTransf);
87 computeBoundingSpheres();
92 const unsigned int bs = bodies_.size();
94 for (
unsigned int j = 0 ; out == OUTSIDE && j < bs ; ++j) {
95 if (bodies_[j].name == name) {
96 if (bodies_[j].body->containsPoint(pt))
int getMaskContainmentforNamedLink(double x, double y, double z, const std::string name) const
Get the containment mask (INSIDE or OUTSIDE) value for an individual point. No setup is performed...
bool assumeFrame(const std_msgs::Header &header)
Assume subsequent calls to getMaskX() will be in the frame passed to this function. This is override function to use tf_prefix. The frame in which the sensor is located is optional.
int getMaskContainmentforNamedLink(const tf::Vector3 &pt, const std::string name) const
SelfMaskNamedLink(tf::TransformListener &tf, const std::vector< LinkInfo > &links, const std::string &tf_prefix="")
Construct the filter.