refactored deskewing, removed duplicated getTransform from OdometryROS, added scan_cloud_is_2d parameter for icp_odometry and rtabmap nodes (to consider input Pointcloud2 as a laser scan).

This commit is contained in:
matlabbe
2022-12-12 22:19:40 -08:00
parent d9996a03f8
commit d09faa9385
11 changed files with 173 additions and 93 deletions
+13
View File
@@ -61,6 +61,19 @@ private:
void callbackScan(const sensor_msgs::LaserScanConstPtr & msg)
{
// make sure the frame of the laser is updated during the whole scan time
rtabmap::Transform tmpT = getTransform(
msg->header.frame_id,
fixedFrameId_,
msg->header.stamp,
msg->header.stamp + ros::Duration().fromSec(msg->ranges.size()*msg->time_increment),
*tfListener_,
waitForTransformDuration_);
if(tmpT.isNull())
{
return;
}
sensor_msgs::PointCloud2 scanOut;
laser_geometry::LaserProjection projection;
projection.transformLaserScanToPointCloud(fixedFrameId_, *msg, scanOut, *tfListener_);