8 #include <sensor_msgs/PointCloud2.h> 9 #include <sensor_msgs/LaserScan.h> 49 NODELET_INFO(
"slerp: %s",
slerp_?
"true":
"false");
77 sensor_msgs::PointCloud2 scanOut;
81 sensor_msgs::PointCloud2 scanOutDeskewed;
84 ROS_ERROR(
"Cannot transform back projected scan from \"%s\" frame to \"%s\" frame at time %fs.",
85 fixedFrameId_.c_str(), msg->header.frame_id.c_str(), msg->header.stamp.toSec());
93 sensor_msgs::PointCloud2 msgDeskewed;
102 ROS_WARN(
"deskewing failed! returning possible skewed cloud!");
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ros::NodeHandle & getNodeHandle() const
std::string fixedFrameId_
ros::NodeHandle & getPrivateNodeHandle() const
bool deskew(const sensor_msgs::PointCloud2 &input, sensor_msgs::PointCloud2 &output, const std::string &fixedFrameId, tf::TransformListener &listener, double waitForTransform, bool slerp=false)
rtabmap::Transform getTransform(const std::string &fromFrameId, const std::string &toFrameId, const ros::Time &stamp, tf::TransformListener &listener, double waitForTransform)
ros::Subscriber subCloud_
tf::TransformListener * tfListener_
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
void publish(const boost::shared_ptr< M > &message) const
virtual ~LidarDeskewing()
Duration & fromSec(double t)
void callbackCloud(const sensor_msgs::PointCloud2ConstPtr &msg)
std::string resolveName(const std::string &name, bool remap=true) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define NODELET_INFO(...)
void transformPointCloud(const pcl::PointCloud< PointT > &cloud_in, pcl::PointCloud< PointT > &cloud_out, const tf::Transform &transform)
PLUGINLIB_EXPORT_CLASS(rtabmap_ros::CoreWrapper, nodelet::Nodelet)
void transformLaserScanToPointCloud(const std::string &target_frame, const sensor_msgs::LaserScan &scan_in, sensor_msgs::PointCloud &cloud_out, tf::Transformer &tf, double range_cutoff, int channel_options=channel_option::Default)
#define NODELET_FATAL(...)
void callbackScan(const sensor_msgs::LaserScanConstPtr &msg)
double waitForTransformDuration_