mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 08:47:45 +08:00
demo_hector_mapping.launch: when "hector" argument is false, icp_odometry is used
This commit is contained in:
+8
-2
@@ -162,8 +162,14 @@ void CoreWrapper::onInit()
|
||||
pnh.param("gen_scan_max_depth", genScanMaxDepth_, genScanMaxDepth_);
|
||||
pnh.param("gen_scan_min_depth", genScanMinDepth_, genScanMinDepth_);
|
||||
pnh.param("scan_cloud_max_points", scanCloudMaxPoints_, scanCloudMaxPoints_);
|
||||
pnh.param("scan_cloud_normal_k", scanCloudNormalK_, scanCloudNormalK_);
|
||||
pnh.param("scan_cloud_normal_radius", scanCloudNormalRadius_, scanCloudNormalRadius_);
|
||||
pnh.param("scan_normal_k", scanCloudNormalK_, scanCloudNormalK_);
|
||||
if(pnh.hasParam("scan_cloud_normal_k") && !pnh.hasParam("scan_normal_k"))
|
||||
{
|
||||
ROS_WARN("rtabmap: Parameter \"scan_cloud_normal_k\" has been renamed to \"scan_normal_k\". "
|
||||
"The value is still used. Use \"scan_normal_k\" to avoid this warning.");
|
||||
pnh.param("scan_cloud_normal_k", scanCloudNormalK_, scanCloudNormalK_);
|
||||
}
|
||||
pnh.param("scan_normal_radius", scanCloudNormalRadius_, scanCloudNormalRadius_);
|
||||
pnh.param("stereo_to_depth", stereoToDepth_, stereoToDepth_);
|
||||
pnh.param("odom_sensor_sync", odomSensorSync_, odomSensorSync_);
|
||||
if(pnh.hasParam("flip_scan"))
|
||||
|
||||
+1
-1
@@ -533,7 +533,7 @@ void OdometryROS::processData(const SensorData & data, const ros::Time & stamp)
|
||||
if(odomLocalScanMap_.getNumSubscribers() && !info.localScanMap.empty())
|
||||
{
|
||||
sensor_msgs::PointCloud2 cloudMsg;
|
||||
if(info.localScanMap.channels() == 6)
|
||||
if(info.localScanMap.channels() >= 5)
|
||||
{
|
||||
pcl::PointCloud<pcl::PointNormal>::Ptr cloud = util3d::laserScanToPointCloudNormal(info.localScanMap);
|
||||
pcl::toROSMsg(*cloud, cloudMsg);
|
||||
|
||||
@@ -74,8 +74,14 @@ private:
|
||||
ros::NodeHandle & pnh = getPrivateNodeHandle();
|
||||
|
||||
pnh.param("scan_cloud_max_points", scanCloudMaxPoints_, scanCloudMaxPoints_);
|
||||
pnh.param("scan_cloud_normal_k", scanCloudNormalK_, scanCloudNormalK_);
|
||||
pnh.param("scan_cloud_normal_k", scanCloudNormalRadius_, scanCloudNormalRadius_);
|
||||
pnh.param("scan_normal_k", scanCloudNormalK_, scanCloudNormalK_);
|
||||
if(pnh.hasParam("scan_cloud_normal_k") && !pnh.hasParam("scan_normal_k"))
|
||||
{
|
||||
ROS_WARN("rtabmap: Parameter \"scan_cloud_normal_k\" has been renamed to \"scan_normal_k\". "
|
||||
"The value is still used. Use \"scan_normal_k\" to avoid this warning.");
|
||||
pnh.param("scan_cloud_normal_k", scanCloudNormalK_, scanCloudNormalK_);
|
||||
}
|
||||
pnh.param("scan_normal_radius", scanCloudNormalRadius_, scanCloudNormalRadius_);
|
||||
|
||||
scan_sub_ = nh.subscribe("scan", 1, &ICPOdometry::callbackScan, this);
|
||||
cloud_sub_ = nh.subscribe("scan_cloud", 1, &ICPOdometry::callbackCloud, this);
|
||||
|
||||
@@ -111,8 +111,14 @@ private:
|
||||
pnh.param("queue_size", queueSize_, queueSize_);
|
||||
pnh.param("subscribe_scan_cloud", subscribeScanCloud, subscribeScanCloud);
|
||||
pnh.param("scan_cloud_max_points", scanCloudMaxPoints_, scanCloudMaxPoints_);
|
||||
pnh.param("scan_cloud_normal_k", scanCloudNormalK_, scanCloudNormalK_);
|
||||
pnh.param("scan_cloud_normal_radius", scanCloudNormalRadius_, scanCloudNormalRadius_);
|
||||
pnh.param("scan_normal_k", scanCloudNormalK_, scanCloudNormalK_);
|
||||
if(pnh.hasParam("scan_cloud_normal_k") && !pnh.hasParam("scan_normal_k"))
|
||||
{
|
||||
ROS_WARN("rtabmap: Parameter \"scan_cloud_normal_k\" has been renamed to \"scan_normal_k\". "
|
||||
"The value is still used. Use \"scan_normal_k\" to avoid this warning.");
|
||||
pnh.param("scan_cloud_normal_k", scanCloudNormalK_, scanCloudNormalK_);
|
||||
}
|
||||
pnh.param("scan_normal_radius", scanCloudNormalRadius_, scanCloudNormalRadius_);
|
||||
|
||||
ros::NodeHandle rgb_nh(nh, "rgb");
|
||||
ros::NodeHandle depth_nh(nh, "depth");
|
||||
|
||||
Reference in New Issue
Block a user