Demonstration for how to create a registered point cloud map using the rc_visard. More...
#include <cloud_accumulator.h>
Public Member Functions | |
CloudAccumulator (double voxelgrid_size_display, double voxelgrid_size_save, double min_distance, double max_distance, std::string output_filename, bool keep_high_res, bool start_paused) | |
void | pointCloudCallback (const pointcloud_t::ConstPtr &pointcloud) |
For each cloud. More... | |
void | poseCallback (const geometry_msgs::PoseStampedConstPtr ¤t_pose) |
Saves camera pose. More... | |
pointcloud_t::Ptr | rebuildCloud () |
For all saved clouds. More... | |
bool | saveCloud (std_srvs::Empty::Request &req, std_srvs::Empty::Request &resp) |
bool | togglePause (std_srvs::Empty::Request &req, std_srvs::Empty::Request &resp) |
Toggle whether to ignore incoming data. More... | |
void | trajectoryCallback (const nav_msgs::PathConstPtr &path) |
Replace all saved camera poses by those in path . More... | |
Private Member Functions | |
Eigen::Affine3f | lookupTransform (double timestamp) |
Private Attributes | |
std::deque< pointcloud_t::Ptr > | clouds_ |
Storage for later corraection and saving. More... | |
pointcloud_t::Ptr | display_cloud_ |
Cloud that is displayed. More... | |
boost::mutex | display_cloud_mutex_ |
bool | keep_high_res_ |
If false, do not store clouds. On save, save display cloud. More... | |
ros::Time | last_pose_stamp_ |
double | max_distance_ |
Discard points farther than this. More... | |
double | min_distance_ |
Discard points closer than this. More... | |
size_t | num_poses_ |
Keep track of pose count (to show a good error message) More... | |
std::string | output_filename_ |
Where to save the cloud. More... | |
bool | pause_ |
Whether to ignore input data. More... | |
tf2_ros::Buffer | tf_buffer_ |
Stores the history of poses and allows to interpolate. More... | |
boost::mutex | tf_buffer_mutex_ |
CloudVisualizer | viewer_ |
boost::thread | viewer_thread_ |
double | voxelgrid_size_display_ |
Filter size for the display cloud. More... | |
double | voxelgrid_size_save_ |
Filter size for the saved cloud. More... | |
Demonstration for how to create a registered point cloud map using the rc_visard.
Definition at line 24 of file cloud_accumulator.h.
rc::CloudAccumulator::CloudAccumulator | ( | double | voxelgrid_size_display, |
double | voxelgrid_size_save, | ||
double | min_distance, | ||
double | max_distance, | ||
std::string | output_filename, | ||
bool | keep_high_res, | ||
bool | start_paused | ||
) |
Definition at line 78 of file cloud_accumulator.cc.
|
private |
Definition at line 168 of file cloud_accumulator.cc.
void rc::CloudAccumulator::pointCloudCallback | ( | const pointcloud_t::ConstPtr & | pointcloud | ) |
For each cloud.
Definition at line 105 of file cloud_accumulator.cc.
void rc::CloudAccumulator::poseCallback | ( | const geometry_msgs::PoseStampedConstPtr & | current_pose | ) |
Saves camera pose.
Definition at line 157 of file cloud_accumulator.cc.
pointcloud_t::Ptr rc::CloudAccumulator::rebuildCloud | ( | ) |
For all saved clouds.
Definition at line 199 of file cloud_accumulator.cc.
bool rc::CloudAccumulator::saveCloud | ( | std_srvs::Empty::Request & | req, |
std_srvs::Empty::Request & | resp | ||
) |
Definition at line 227 of file cloud_accumulator.cc.
bool rc::CloudAccumulator::togglePause | ( | std_srvs::Empty::Request & | req, |
std_srvs::Empty::Request & | resp | ||
) |
Toggle whether to ignore incoming data.
Definition at line 247 of file cloud_accumulator.cc.
void rc::CloudAccumulator::trajectoryCallback | ( | const nav_msgs::PathConstPtr & | path | ) |
Replace all saved camera poses by those in path
.
Definition at line 143 of file cloud_accumulator.cc.
|
private |
Storage for later corraection and saving.
Definition at line 74 of file cloud_accumulator.h.
|
private |
Cloud that is displayed.
Definition at line 79 of file cloud_accumulator.h.
|
private |
Definition at line 78 of file cloud_accumulator.h.
|
private |
If false, do not store clouds. On save, save display cloud.
Definition at line 85 of file cloud_accumulator.h.
|
private |
Definition at line 89 of file cloud_accumulator.h.
|
private |
Discard points farther than this.
Definition at line 83 of file cloud_accumulator.h.
|
private |
Discard points closer than this.
Definition at line 82 of file cloud_accumulator.h.
|
private |
Keep track of pose count (to show a good error message)
Definition at line 77 of file cloud_accumulator.h.
|
private |
Where to save the cloud.
Definition at line 84 of file cloud_accumulator.h.
|
private |
Whether to ignore input data.
Definition at line 86 of file cloud_accumulator.h.
|
private |
Stores the history of poses and allows to interpolate.
Definition at line 76 of file cloud_accumulator.h.
|
private |
Definition at line 75 of file cloud_accumulator.h.
|
private |
Definition at line 87 of file cloud_accumulator.h.
|
private |
Definition at line 88 of file cloud_accumulator.h.
|
private |
Filter size for the display cloud.
Definition at line 80 of file cloud_accumulator.h.
|
private |
Filter size for the saved cloud.
Definition at line 81 of file cloud_accumulator.h.