- Author
- Joel Pereira
points_from_volume
The points_from_volume package
points_from_volume is a package that includes points_from_volume library
The points_from_volume library extracts points from the inside/outside of a polygon.
Usage
How to use?
Class declaration
On the code do:
Definition of parameters (Mandatory)
ros::init(argc, argv, "points_from_volume_nodelet");
ros::NodeHandle n("~");
n.param(
"positive_offset",
positive, 2.0);
n.param(
"negative_offset",
negative, -0.1);
n.param(
"flag_in_out",
flag,
false);
ROS subscription
ros::Subscriber sub2 = n.subscribe (
"/point_cloud_input", 1,
cloud_cb);
Callbaks
Publish the point cloud
ros::Publisher = n.advertise<sensor_msgs::PointCloud2>("/pcmsg_out", 1);
The example nodelet
Example of a xml launch file for a point cloud received from a Kinect sensor
<launch>
<node name="openni_node" pkg="openni_camera" type="openni_node" />
<node name="points_from_volume_nodelet" pkg="points_from_volume" type="points_from_volume_nodelet" args="point_cloud_input:=/camera/depth/points"/>
<!-- Setting parameters -->
<param name= "positive_offset" type="float" value="2.0" />
<param name= "negative_offset" type="float" value="-0.1" />
<param name= "flag_in_out" type="bool" value="false" />
<!-- !!!You need to publish your convexhull points too!!! -->
</launch>