Files | |
file | extract_polygon_primitives.cpp |
The main file of the extract polygon primitives binary. | |
file | extract_polygon_primitives.h |
Header of the extract polygon primitives binary. | |
file | extract_polygon_primitives_handlers.cpp |
The ros message handlers are defined here. | |
file | extract_polygon_primitives_rvizmarkers.cpp |
Implements functions to produce rviz markers. | |
Defines | |
#define | _EXTERN_ extern |
#define | _GROUND_PLG_LONG_EXPANSION_ 15 |
#define | _GROUND_PLG_PERP_EXPANSION_ 0.3 |
#define | _MAX_ITERATION_TIME_ 20.0 |
#define | _MAX_NUM_POLYGONS_ 270 |
#define | _VERTICAL_PLG_LONG_EXPANSION_ 0.2 |
#define | _VERTICAL_PLG_PERP_EXPANSION_ 0.5 |
#define | DEBUG 0 |
#define | PFLN {printf("DEBUG PRINT FILE %s LINE %d\n",__FILE__,__LINE__);} |
Ros includes. | |
#define | USE_EXPANSION 1 |
Functions | |
int | compute_normals (pcl::PointCloud< pcl::PointXYZ > *pc_in, float vx, float vy, float vz, float radius, int K, pcl::PointCloud< pcl::Normal > *pc_out) |
Estimate normals for pc_in using either radius or K. | |
void | create_publish_marker_array (std::vector< c_polygon_primitive > *plg, visualization_msgs::MarkerArray *marker_array_msg) |
visualization_msgs::Marker | create_visualization_marker_header (std::string frame_id, ros::Time stamp, std::string name, int action, int id, int type, double px, double py, double pz, double qx, double qy, double qz, double qw, double sx, double sy, double sz, double cr, double cg, double cb, double alpha) |
void | draw_markers (int k, Eigen::Vector4f *q_avg, std::vector< Eigen::Vector4f > *qv, pcl::PointCloud< pcl::PointNormal >::Ptr pc, std::vector< int > *pointIdxRadiusSearch, Eigen::Vector4f *q_avg0, std::vector< bool > *is_fliped) |
void | filter_uncoherent_points (pcl::PointCloud< pcl::PointNormal >::Ptr pc, double radius, pcl::PointCloud< pcl::PointNormal >::Ptr pcout, pcl::PointCloud< pcl::PointNormal >::Ptr pcelim, float vx, float vy, float vz) |
void | filter_uncoherent_points (pcl::PointCloud< pcl::PointXYZ >::Ptr pcin, pcl::PointCloud< pcl::PointXYZ > *pcout, pcl::PointCloud< pcl::PointXYZ > *pcelim, pcl::PointCloud< pcl::Normal >::Ptr n, double radius, float vx, float vy, float vz) |
int | get_vehicle_position (ros::NodeHandle *pn, tf::TransformListener *listener, tf::StampedTransform *vehicle_tf, ros::Time *t) |
Gets the vehicle position by querying for the propper transform. | |
int | main (int argc, char **argv) |
The main function for the extraction of polygon primitives. | |
void | PointCloudHandler (const sensor_msgs::PointCloud2ConstPtr &input) |
bool | polygon_has_quality (double area, double solidity) |
int | publish_point_cloud (std::vector< boost::shared_ptr< ros::Publisher > > *publishers, pcl::PointCloud< pcl::PointXYZ >::Ptr pc, std::string topic_name) |
int | publish_point_cloud (std::vector< boost::shared_ptr< ros::Publisher > > *publishers, pcl::PointCloud< pcl::PointXYZ > *pc, std::string topic_name) |
int | save_pc_PointNormal_to_pcd (pcl::PointCloud< pcl::PointXYZ > *pc_in, pcl::PointCloud< pcl::Normal > *normals_in, std::string name) |
Saves a composite point cloud with normals to a file. After saving you can use "rosrun pcl pcd_viewer <filename> -normal 10 -normal_scale 1" to view the normals. | |
void | VehiclePoseHandler (const geometry_msgs::PoseStamped &lpose) |
Variables | |
unsigned char | b [16] |
_EXTERN_ pcl::PointCloud < pcl::PointXYZ > | cloud |
unsigned char | cr [16] |
_EXTERN_ int | flag_msg_received |
unsigned char | g [16] |
_EXTERN_ ros::Time | laser_ts |
_EXTERN_ ros::NodeHandle * | pn |
_EXTERN_ std::vector < boost::shared_ptr < ros::Publisher > > | publishers |
| |
void | get_limits (double mean, double std, double factor, double *high, double *low) |
#define _EXTERN_ extern |
Definition at line 118 of file extract_polygon_primitives.h.
#define _GROUND_PLG_LONG_EXPANSION_ 15 |
Definition at line 51 of file extract_polygon_primitives.cpp.
#define _GROUND_PLG_PERP_EXPANSION_ 0.3 |
Definition at line 52 of file extract_polygon_primitives.cpp.
#define _MAX_ITERATION_TIME_ 20.0 |
Definition at line 54 of file extract_polygon_primitives.cpp.
#define _MAX_NUM_POLYGONS_ 270 |
Definition at line 71 of file extract_polygon_primitives.h.
#define _VERTICAL_PLG_LONG_EXPANSION_ 0.2 |
Definition at line 49 of file extract_polygon_primitives.cpp.
#define _VERTICAL_PLG_PERP_EXPANSION_ 0.5 |
Definition at line 50 of file extract_polygon_primitives.cpp.
#define DEBUG 0 |
Definition at line 55 of file extract_polygon_primitives.cpp.
#define PFLN {printf("DEBUG PRINT FILE %s LINE %d\n",__FILE__,__LINE__);} |
Ros includes.
PLC includes Rviz includes Other modules include Local includes
Definition at line 70 of file extract_polygon_primitives.h.
#define USE_EXPANSION 1 |
Definition at line 56 of file extract_polygon_primitives.cpp.
int compute_normals | ( | pcl::PointCloud< pcl::PointXYZ > * | pc_in, | |
float | vx, | |||
float | vy, | |||
float | vz, | |||
float | radius, | |||
int | K, | |||
pcl::PointCloud< pcl::Normal > * | pc_out | |||
) |
Estimate normals for pc_in using either radius or K.
pc_in | the point cloud to estimate the normals from | |
vx | the viewpoint x coordinate | |
vyvthe | viewpoint y coordinate | |
vz | the viewpoint z coordinate | |
radius | radius of the neighborhood to estimate the normals for each point | |
K | number of neighbors to define the neighborhood to estimate the normals for each point | |
pc_out | the normals out. Same size as pc_in |
Definition at line 103 of file extract_polygon_primitives_auxiliary.cpp.
void create_publish_marker_array | ( | std::vector< c_polygon_primitive > * | plg, | |
visualization_msgs::MarkerArray * | marker_array_msg | |||
) |
Definition at line 63 of file extract_polygon_primitives_rvizmarkers.cpp.
visualization_msgs::Marker create_visualization_marker_header | ( | std::string | frame_id, | |
ros::Time | stamp, | |||
std::string | name, | |||
int | action, | |||
int | id, | |||
int | type, | |||
double | px, | |||
double | py, | |||
double | pz, | |||
double | qx, | |||
double | qy, | |||
double | qz, | |||
double | qw, | |||
double | sx, | |||
double | sy, | |||
double | sz, | |||
double | cr, | |||
double | cg, | |||
double | cb, | |||
double | alpha | |||
) |
Definition at line 44 of file extract_polygon_primitives_rvizmarkers.cpp.
void draw_markers | ( | int | k, | |
Eigen::Vector4f * | q_avg, | |||
std::vector< Eigen::Vector4f > * | qv, | |||
pcl::PointCloud< pcl::PointNormal >::Ptr | pc, | |||
std::vector< int > * | pointIdxRadiusSearch, | |||
Eigen::Vector4f * | q_avg0, | |||
std::vector< bool > * | is_fliped | |||
) |
Definition at line 469 of file extract_polygon_primitives_auxiliary.cpp.
void filter_uncoherent_points | ( | pcl::PointCloud< pcl::PointNormal >::Ptr | pc, | |
double | radius, | |||
pcl::PointCloud< pcl::PointNormal >::Ptr | pcout, | |||
pcl::PointCloud< pcl::PointNormal >::Ptr | pcelim, | |||
float | vx, | |||
float | vy, | |||
float | vz | |||
) |
Definition at line 298 of file extract_polygon_primitives_auxiliary.cpp.
void filter_uncoherent_points | ( | pcl::PointCloud< pcl::PointXYZ >::Ptr | pcin, | |
pcl::PointCloud< pcl::PointXYZ > * | pcout, | |||
pcl::PointCloud< pcl::PointXYZ > * | pcelim, | |||
pcl::PointCloud< pcl::Normal >::Ptr | n, | |||
double | radius, | |||
float | vx, | |||
float | vy, | |||
float | vz | |||
) |
Definition at line 137 of file extract_polygon_primitives_auxiliary.cpp.
void get_limits | ( | double | mean, | |
double | std, | |||
double | factor, | |||
double * | high, | |||
double * | low | |||
) |
Definition at line 178 of file extract_polygon_primitives_auxiliary.cpp.
int get_vehicle_position | ( | ros::NodeHandle * | pn, | |
tf::TransformListener * | listener, | |||
tf::StampedTransform * | vehicle_tf, | |||
ros::Time * | t | |||
) |
Gets the vehicle position by querying for the propper transform.
listener | listerner class to liikup transform | |
vehicle_tf | the output transform | |
t | time |
Definition at line 49 of file extract_polygon_primitives_auxiliary.cpp.
int main | ( | int | argc, | |
char ** | argv | |||
) |
The main function for the extraction of polygon primitives.
argc | the standard argc | |
argv | the standard argv |
Definition at line 118 of file extract_polygon_primitives.cpp.
void PointCloudHandler | ( | const sensor_msgs::PointCloud2ConstPtr & | input | ) |
Definition at line 41 of file extract_polygon_primitives_handlers.cpp.
bool polygon_has_quality | ( | double | area, | |
double | solidity | |||
) |
Definition at line 58 of file extract_polygon_primitives.cpp.
int publish_point_cloud | ( | std::vector< boost::shared_ptr< ros::Publisher > > * | publishers, | |
pcl::PointCloud< pcl::PointXYZ >::Ptr | pc, | |||
std::string | topic_name | |||
) |
Definition at line 105 of file extract_polygon_primitives.cpp.
int publish_point_cloud | ( | std::vector< boost::shared_ptr< ros::Publisher > > * | publishers, | |
pcl::PointCloud< pcl::PointXYZ > * | pc, | |||
std::string | topic_name | |||
) |
Definition at line 84 of file extract_polygon_primitives.cpp.
int save_pc_PointNormal_to_pcd | ( | pcl::PointCloud< pcl::PointXYZ > * | pc_in, | |
pcl::PointCloud< pcl::Normal > * | normals_in, | |||
std::string | name | |||
) |
Saves a composite point cloud with normals to a file. After saving you can use "rosrun pcl pcd_viewer <filename> -normal 10 -normal_scale 1" to view the normals.
pc_in | point cloud with points | |
normals_in | point cloud with normals | |
name | the filename |
Definition at line 81 of file extract_polygon_primitives_auxiliary.cpp.
void VehiclePoseHandler | ( | const geometry_msgs::PoseStamped & | lpose | ) |
unsigned char b[16] |
_EXTERN_ pcl::PointCloud<pcl::PointXYZ> cloud |
Definition at line 126 of file extract_polygon_primitives.h.
unsigned char cr[16] |
_EXTERN_ int flag_msg_received |
Definition at line 128 of file extract_polygon_primitives.h.
unsigned char g[16] |
_EXTERN_ ros::Time laser_ts |
Definition at line 127 of file extract_polygon_primitives.h.
_EXTERN_ ros::NodeHandle* pn |
Definition at line 129 of file extract_polygon_primitives.h.
_EXTERN_ std::vector<boost::shared_ptr<ros::Publisher> > publishers |
Definition at line 125 of file extract_polygon_primitives.h.