mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
removed "scan_inf_is_valid" parameter
This commit is contained in:
@@ -19,10 +19,9 @@
|
||||
<param name="cloud_decimation" type="int" value="1"/> <!-- we already decimate in memory below -->
|
||||
<param name="grid_eroded" type="bool" value="true"/>
|
||||
<param name="grid_cell_size" type="double" value="0.05"/>
|
||||
<param name="scan_inf_is_valid" type="bool" value="true"/>
|
||||
|
||||
<remap from="odom" to="/base_controller/odom"/>
|
||||
<remap from="scan" to="/scan"/>
|
||||
<remap from="scan" to="/base_scan"/>
|
||||
<remap from="mapData" to="mapData"/>
|
||||
|
||||
<remap from="rgb/image" to="/camera/rgb/image_rect_color"/>
|
||||
@@ -80,7 +79,7 @@
|
||||
|
||||
<!-- ROS navigation stack move_base -->
|
||||
<group ns="planner">
|
||||
<remap from="base_scan" to="/scan"/>
|
||||
<remap from="base_scan" to="/base_scan"/>
|
||||
<remap from="obstacles_cloud" to="/obstacles_cloud"/>
|
||||
<remap from="ground_cloud" to="/ground_cloud"/>
|
||||
<remap from="map" to="/map"/>
|
||||
|
||||
@@ -90,7 +90,6 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
|
||||
databasePath_(UDirectory::homeDir()+"/.ros/"+rtabmap::Parameters::getDefaultDatabaseName()),
|
||||
waitForTransform_(false),
|
||||
useActionForGoal_(false),
|
||||
scanInfIsValid_(false),
|
||||
cloudDecimation_(4),
|
||||
cloudMaxDepth_(4.0), // meters
|
||||
cloudVoxelSize_(0.05), // meters
|
||||
@@ -163,9 +162,6 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
|
||||
pnh.param("wait_for_transform", waitForTransform_, waitForTransform_);
|
||||
pnh.param("use_action_for_goal", useActionForGoal_, useActionForGoal_);
|
||||
|
||||
// scan stuff
|
||||
pnh.param("scan_inf_is_valid", scanInfIsValid_, scanInfIsValid_);
|
||||
|
||||
// cloud map stuff
|
||||
pnh.param("cloud_decimation", cloudDecimation_, cloudDecimation_);
|
||||
pnh.param("cloud_max_depth", cloudMaxDepth_, cloudMaxDepth_);
|
||||
@@ -710,27 +706,7 @@ void CoreWrapper::commonDepthCallback(
|
||||
//transform in frameId_ frame
|
||||
sensor_msgs::PointCloud2 scanOut;
|
||||
laser_geometry::LaserProjection projection;
|
||||
|
||||
if(scanInfIsValid_)
|
||||
{
|
||||
// Filter positive infinities ("Inf"s) to max_range.
|
||||
float epsilon = 0.0001; // a tenth of a millimeter
|
||||
sensor_msgs::LaserScan message = *scanMsg;
|
||||
for( size_t i = 0; i < message.ranges.size(); i++ )
|
||||
{
|
||||
float range = message.ranges[ i ];
|
||||
if( !std::isfinite( range ) && range > 0 )
|
||||
{
|
||||
message.ranges[ i ] = message.range_max - epsilon;
|
||||
}
|
||||
}
|
||||
projection.transformLaserScanToPointCloud(frameId_, message, scanOut, tfListener_);
|
||||
}
|
||||
else
|
||||
{
|
||||
projection.transformLaserScanToPointCloud(frameId_, *scanMsg, scanOut, tfListener_);
|
||||
}
|
||||
|
||||
pcl::PointCloud<pcl::PointXYZ> pclScan;
|
||||
pcl::fromROSMsg(scanOut, pclScan);
|
||||
scan = util3d::laserScanFromPointCloud(pclScan);
|
||||
@@ -811,27 +787,7 @@ void CoreWrapper::commonStereoCallback(
|
||||
//transform in frameId_ frame
|
||||
sensor_msgs::PointCloud2 scanOut;
|
||||
laser_geometry::LaserProjection projection;
|
||||
|
||||
if(scanInfIsValid_)
|
||||
{
|
||||
// Filter positive infinities ("Inf"s) to max_range.
|
||||
float epsilon = 0.0001; // a tenth of a millimeter
|
||||
sensor_msgs::LaserScan message = *scanMsg;
|
||||
for( size_t i = 0; i < message.ranges.size(); i++ )
|
||||
{
|
||||
float range = message.ranges[ i ];
|
||||
if( !std::isfinite( range ) && range > 0 )
|
||||
{
|
||||
message.ranges[ i ] = message.range_max - epsilon;
|
||||
}
|
||||
}
|
||||
projection.transformLaserScanToPointCloud(frameId_, message, scanOut, tfListener_);
|
||||
}
|
||||
else
|
||||
{
|
||||
projection.transformLaserScanToPointCloud(frameId_, *scanMsg, scanOut, tfListener_);
|
||||
}
|
||||
|
||||
pcl::PointCloud<pcl::PointXYZ> pclScan;
|
||||
pcl::fromROSMsg(scanOut, pclScan);
|
||||
scan = util3d::laserScanFromPointCloud(pclScan);
|
||||
|
||||
@@ -237,7 +237,6 @@ private:
|
||||
bool useActionForGoal_;
|
||||
|
||||
// mapping stuff
|
||||
bool scanInfIsValid_;
|
||||
int cloudDecimation_;
|
||||
double cloudMaxDepth_;
|
||||
double cloudVoxelSize_;
|
||||
|
||||
Reference in New Issue
Block a user