Go to the documentation of this file.
37 #ifndef JSK_INTERACTIVE_MARKER_POINTCLOUD_CLOPPER_H_
38 #define JSK_INTERACTIVE_MARKER_POINTCLOUD_CLOPPER_H_
40 #define BOOST_PARAMETER_MAX_ARITY 7 // its a hack
42 #include <jsk_topic_tools/time_accumulator.h>
47 #include <sensor_msgs/PointCloud2.h>
49 #include <pcl/point_types.h>
50 #include <pcl/point_cloud.h>
51 #include <sensor_msgs/PointCloud2.h>
55 #include <dynamic_reconfigure/server.h>
56 #include <jsk_interactive_marker/PointCloudCropperConfig.h>
64 typedef std::shared_ptr<Cropper>
Ptr;
65 Cropper(
const unsigned int nr_parameter);
68 virtual void crop(
const pcl::PointCloud<pcl::PointXYZ>::Ptr& input,
69 pcl::PointCloud<pcl::PointXYZ>::Ptr output);
70 virtual std::string
getName() = 0;
71 virtual visualization_msgs::Marker
getMarker() = 0;
72 virtual void updateParameter(
const double val,
const unsigned int index);
74 virtual bool isInside(
const pcl::PointXYZ& p) = 0;
76 virtual void setPose(Eigen::Affine3f pose);
77 virtual Eigen::Affine3f
getPose();
90 typedef std::shared_ptr<SphereCropper>
Ptr;
95 virtual visualization_msgs::Marker
getMarker();
96 virtual bool isInside(
const pcl::PointXYZ& p);
107 typedef std::shared_ptr<CubeCropper>
Ptr;
112 virtual visualization_msgs::Marker
getMarker();
113 virtual bool isInside(
const pcl::PointXYZ& p);
132 typedef std::vector<interactive_markers::MenuHandler::EntryHandle>
135 virtual void inputCallback(
const sensor_msgs::PointCloud2::ConstPtr& msg);
138 Eigen::Affine3f pose_offset = Eigen::Affine3f::Identity());
140 Eigen::Affine3f pose_offset = Eigen::Affine3f::Identity());
142 const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback);
144 const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback);
146 const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
154 std::shared_ptr<interactive_markers::InteractiveMarkerServer>
server_;
157 std::shared_ptr <dynamic_reconfigure::Server<Config> >
srv_;
virtual double getWidthZ()
virtual void setPose(Eigen::Affine3f pose)
std::shared_ptr< interactive_markers::InteractiveMarkerServer > server_
virtual double getWidthY()
virtual std::string getName()
Cropper(const unsigned int nr_parameter)
virtual bool isInside(const pcl::PointXYZ &p)
interactive_markers::MenuHandler menu_handler_
virtual void updateParameter(const double val, const unsigned int index)
std::vector< Cropper::Ptr > cropper_candidates_
unsigned int nr_parameter_
PointCloudCropperConfig Config
virtual bool isInside(const pcl::PointXYZ &p)=0
virtual void crop(const pcl::PointCloud< pcl::PointXYZ >::Ptr &input, pcl::PointCloud< pcl::PointXYZ >::Ptr output)
ros::Publisher point_pub_
virtual void fillInitialParameters()
virtual void initializeInteractiveMarker(Eigen::Affine3f pose_offset=Eigen::Affine3f::Identity())
std::shared_ptr< SphereCropper > Ptr
virtual std::string getName()=0
virtual bool isInside(const pcl::PointXYZ &p)
virtual void reInitializeInteractiveMarker()
virtual visualization_msgs::Marker getMarker()=0
virtual Eigen::Affine3f getPose()
std::shared_ptr< dynamic_reconfigure::Server< Config > > srv_
virtual double getRadius()
virtual std::string getName()
PointCloudCropper(ros::NodeHandle &nh, ros::NodeHandle &pnh)
virtual void configCallback(Config &config, uint32_t level)
virtual double getWidthX()
virtual void changeCropper(Cropper::Ptr next_cropper)
std::vector< interactive_markers::MenuHandler::EntryHandle > EntryHandleVector
virtual visualization_msgs::Marker getMarker()
virtual ~PointCloudCropper()
virtual void menuFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
virtual void updateInteractiveMarker(Eigen::Affine3f pose_offset=Eigen::Affine3f::Identity())
virtual void changeCropperCallback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
std::vector< double > parameters_
sensor_msgs::PointCloud2::ConstPtr latest_pointcloud_
virtual void inputCallback(const sensor_msgs::PointCloud2::ConstPtr &msg)
ros::Publisher point_visualization_pub_
ros::Subscriber point_sub_
EntryHandleVector cropper_entries_
virtual void fillInitialParameters()
virtual void fillInitialParameters()=0
virtual void updateMenuCheckboxStatus()
virtual void cropAndPublish(ros::Publisher &pub)
std::shared_ptr< CubeCropper > Ptr
std::shared_ptr< tf::TransformListener > tf_listener_
virtual void processFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
std::shared_ptr< Cropper > Ptr
virtual visualization_msgs::Marker getMarker()