Update: adding the following code at 442 in mapper.cpp resolves all issues except using the identity corrupts the map going forward. not sure how to resolve.
int cloudDimension = mapPointCloud->getEuclideanDim();
if (!transformation->checkParameters(Ticp)) {
ROS_INFO_STREAM("Initial transformation is not rigid, identiy will be used");
int cloudDimension = mapPointCloud->getEuclideanDim();
Ticp = PM::TransformationParameters::Identity(
cloudDimension+1,cloudDimension+1);
}
I have been trying to get mapping to work for a sequence of point clouds under ubuntu16 kinetic.
It starts to work..."Creating an initial map" that show ok in rviz then....it just stops adding new points. it looks like mapBuildingInProgress variable is never reset. Then after a while it start generating translation errors. I tried compiling without boost but then it fails right off with a translation error...I did not list here. I am running a bag file rgbd_dataset_freiburg3_long_office_household_validation s then generate point cloud and pass it to mapping. I use ros image proc to do this last part. The transform errors at the end I am wondering if the transform is not being normalized. Example of launch file given at end.
[ INFO] [1513563048.190694245, 1341848149.617713142]: Adding new points to the map in background
[ INFO] [1513563048.190762154, 1341848149.617713142]: [TIME] Total ICP took: 0.691481 [s]
[ INFO] [1513563048.190797388, 1341848149.617713142]: [TIME] Real-time capability: 0%
[ INFO] [1513563048.215309334, 1341848149.620736564]: Processing new point cloud
[ INFO] [1513563048.215343556, 1341848149.620736564]: Input filters took 1.634e-06 [s]
[ INFO] [1513563048.215742940, 1341848149.620736564]: Applying 1 DataPoints filters - 82886 points in
[ INFO] [1513563048.217802505, 1341848149.620736564]: * RandomSamplingDataPointsFilter - 41639 points out (-49.7635%)
[ INFO] [1513563048.217815591, 1341848149.620736564]: Applied 1 filters - 41639 points out (-49.7635%)
[ INFO] [1513563048.228549735, 1341848149.621743327]: Applying 1 DataPoints filters - 83776 points in
[ INFO] [1513563048.230814973, 1341848149.621743327]: * RandomSamplingDataPointsFilter - 41565 points out (-50.3856%)
[ INFO] [1513563048.230865353, 1341848149.621743327]: Applied 1 filters - 41565 points out (-50.3856%)
[ INFO] [1513563048.231735271, 1341848149.622754062]: PointMatcher::icp - reading pre-processing took 0.00400291 [s]
[ INFO] [1513563048.321473443, 1341848149.630807623]: PointMatcher::icp - 4 iterations took 0.594932 [s]
[ INFO] [1513563048.321527407, 1341848149.630807623]: PointToPointSimilarityErrorMinimizer - warning, no sensor noise found. Using best estimate given outlier rejection instead.
[ INFO] [1513563048.321543391, 1341848149.630807623]: Overlap: 0.950006
[ INFO] [1513563048.321591392, 1341848149.630807623]: [TIME] Total ICP took: 0.612256 [s]
[ WARN] [1513563048.321642030, 1341848149.630807623]: [TIME] Real-time capability: 1003%
[ INFO] [1513563048.345921580, 1341848149.633828378]: Processing new point cloud
[ INFO] [1513563048.345971216, 1341848149.633828378]: Input filters took 1.594e-06 [s]
[ INFO] [1513563048.346404271, 1341848149.633828378]: Applying 1 DataPoints filters - 82886 points in
[ INFO] [1513563048.348521506, 1341848149.633828378]: * RandomSamplingDataPointsFilter - 41450 points out (-49.9916%)
[ INFO] [1513563048.348554072, 1341848149.633828378]: Applied 1 filters - 41450 points out (-49.9916%)
[ INFO] [1513563048.359308281, 1341848149.634838601]: Applying 1 DataPoints filters - 83261 points in
[ INFO] [1513563048.361516117, 1341848149.634838601]: * RandomSamplingDataPointsFilter - 41433 points out (-50.2372%)
[ INFO] [1513563048.361555641, 1341848149.634838601]: Applied 1 filters - 41433 points out (-50.2372%)
[ INFO] [1513563048.362282636, 1341848149.635844327]: PointMatcher::icp - reading pre-processing took 0.00376824 [s]
[ INFO] [1513563048.456318331, 1341848149.645006912]: PointMatcher::icp - 4 iterations took 0.614608 [s]
[ INFO] [1513563048.456383837, 1341848149.645006912]: PointToPointSimilarityErrorMinimizer - warning, no sensor noise found. Using best estimate given outlier rejection instead.
[ INFO] [1513563048.456414016, 1341848149.645006912]: Overlap: 0.950008
[ INFO] [1513563048.456492082, 1341848149.645006912]: [TIME] Total ICP took: 0.632074 [s]
[ WARN] [1513563048.456503426, 1341848149.645006912]: [TIME] Real-time capability: 929%
[ INFO] [1513563048.480175853, 1341848149.647018483]: Processing new point cloud
[ INFO] [1513563048.480241553, 1341848149.647018483]: Input filters took 1.423e-06 [s]
[ INFO] [1513563048.480633298, 1341848149.647018483]: Applying 1 DataPoints filters - 82886 points in
[ INFO] [1513563048.482735212, 1341848149.647018483]: * RandomSamplingDataPointsFilter - 41740 points out (-49.6417%)
[ INFO] [1513563048.482760453, 1341848149.647018483]: Applied 1 filters - 41740 points out (-49.6417%)
[ INFO] [1513563048.493700512, 1341848149.648024125]: Applying 1 DataPoints filters - 83252 points in
[ INFO] [1513563048.495801371, 1341848149.649032187]: * RandomSamplingDataPointsFilter - 41455 points out (-50.2054%)
[ INFO] [1513563048.495816299, 1341848149.649032187]: Applied 1 filters - 41455 points out (-50.2054%)
[ INFO] [1513563048.496410142, 1341848149.649032187]: PointMatcher::icp - reading pre-processing took 0.00330159 [s]
[ INFO] [1513563048.589969629, 1341848149.658084014]: PointMatcher::icp - 4 iterations took 0.620074 [s]
[ INFO] [1513563048.590036678, 1341848149.658084014]: PointToPointSimilarityErrorMinimizer - warning, no sensor noise found. Using best estimate given outlier rejection instead.
[ INFO] [1513563048.590066753, 1341848149.658084014]: Overlap: 0.950002
[ INFO] [1513563048.590230464, 1341848149.658084014]: [TIME] Total ICP took: 0.637544 [s]
[ WARN] [1513563048.590283635, 1341848149.658084014]: [TIME] Real-time capability: 1992%
[ INFO] [1513563048.614454123, 1341848149.660099698]: Processing new point cloud
Error: TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id "odom" from authority "unknown_publisher" because of an invalid quaternion in the transform (0.021138 0.023537 0.011691 0.993532)
at line 257 in /tmp/binarydeb/ros-kinetic-tf2-0.5.16/src/buffer_core.cpp[ERROR] [1513563072.392325512, 1341848152.037934144]: Ignoring transform for child_frame_id "odom" from authority "unknown_publisher" because of an invalid quaternion in the transform (0.021138 0.023537 0.011691 0.993532)
Error: TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id "odom" from authority "unknown_publisher" because of an invalid quaternion in the transform (0.021138 0.023537 0.011691 0.993532)
at line 257 in /tmp/binarydeb/ros-kinetic-tf2-0.5.16/src/buffer_core.cpp
Error: TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id "odom" from authority "unknown_publisher" because of an invalid quaternion in the transform (0.021138 0.023537 0.011691 0.993532)
at line 257 in /tmp/binarydeb/ros-kinetic-tf2-0.5.16/src/buffer_core.cpp
Error: TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id "odom" from authority "unknown_publisher" because of an invalid quaternion in the transform (0.021138 0.023537 0.011691 0.993532)
at line 257 in /tmp/binarydeb/ros-kinetic-tf2-0.5.16/src/buffer_core.cpp
[ERROR] [1513563072.484770115, 1341848152.048024109]: Ignoring transform for child_frame_id "odom" from authority "unknown_publisher" because of an invalid quaternion in the transform (0.021138 0.023537 0.011691 0.993532)
<launch>
<arg name="rviz_cfg" default="$(find misc)/launch/config/icp_manager.rviz" />
<arg name="bag_file" default="/home/rjn/data/bags/downloads/rgbd_dataset_freiburg3_long_office_household_validation.bag" />
<arg name="bag_image_topic" default="/camera/rgb/image_color" />
<arg name="bag_depth_topic" default="/camera/depth/image" />
<param name="use_sim_time" value="true" />
<node pkg="rosbag" type="play" name="player" output="log" args=" --clock --delay 6 -r .1 $(arg bag_file)"/>
<node pkg="nodelet" type="nodelet" name="manager" args="manager" output="screen"/>
<node pkg="nodelet" type="nodelet" name="points_xyzrgb" args="load depth_image_proc/point_cloud_xyzrgb manager">
<remap from="rgb/camera_info" to="/camera/rgb/camera_info" />
<remap from="rgb/image_rect_color" to="$(arg bag_image_topic)"/>
<remap from="depth_registered/image_rect" to="$(arg bag_depth_topic)"/>
<remap from="depth_registered/points" to="/cloud"/>
<param name="queue_size" type="int" value="50"/>
</node>
<node name="mapper" type="mapper" pkg="ethzasl_icp_mapper" output="screen" >
<param name="subscribe_scan" value="false" />
<remap from="cloud_in" to="/cloud" />
<param name="subscribe_cloud" value="true" />
<param name="publishMapTf" value="false" />
<param name="icpConfig" value="$(find misc)/launch/config/my.yaml" />
<param name="map_frame" value="map" />
<param name="odom_frame" value="world" />
<param name="useROSLogger" value="true" />
<param name="minOverlap" value="0.50" />
<param name="maxOverlapToMerge" value="0.99" />
<param name="minMapPointCount" value="100" />
<param name="minReadingPointCount" value="100" />
<param name="localizing" value="true" />
<param name="mapping" value="true" />
<param name="maxDistNewPoint" value="100.0" />
</node>
<node pkg="rviz" type="rviz" name="rviz" args="-d $(arg rviz_cfg)"/>
</launch>
If I remove boost from mapper.cpp I get the following error right off after initial map. The line "sendTransform-1" is a print I added before the error at line 539.
*newPointCloud = transformation->compute(*newPointCloud, Ticp);
[ INFO] [1513634413.657895768, 1341848151.177497522]: Processing new point cloud
[ INFO] [1513634413.657952216, 1341848151.177497522]: Input filters took 1.696e-06 [s]
[ INFO] [1513634413.673889009, 1341848151.177497522]: Applying 1 DataPoints filters - 2120323 points in
[ INFO] [1513634413.724600373, 1341848151.198658212]: * RandomSamplingDataPointsFilter - 1060219 points out (-49.9973%)
[ INFO] [1513634413.724639231, 1341848151.198658212]: Applied 1 filters - 1060219 points out (-49.9973%)
[ INFO] [1513634414.041275483, 1341848151.262386154]: Applying 1 DataPoints filters - 264568 points in
[ INFO] [1513634414.047509273, 1341848151.264402859]: * RandomSamplingDataPointsFilter - 131728 points out (-50.2102%)
[ INFO] [1513634414.047549204, 1341848151.264402859]: Applied 1 filters - 131728 points out (-50.2102%)
[ INFO] [1513634414.049618960, 1341848151.264402859]: PointMatcher::icp - reading pre-processing took 0.0099291 [s]
[ INFO] [1513634414.419304568, 1341848151.339013279]: PointMatcher::icp - 4 iterations took 1.71663 [s]
[ INFO] [1513634414.419374035, 1341848151.339013279]: PointToPointSimilarityErrorMinimizer - warning, no sensor noise found. Using best estimate given outlier rejection instead.
[ INFO] [1513634414.419389515, 1341848151.339013279]: Overlap: 0.950001
[ INFO] [1513634414.419462216, 1341848151.339013279]: sendTransform-1 1.00043 0.00244218 0.000782185 -0.00222898
-0.00244356 1.00043 0.00198656 -0.00709355
-0.000777324 -0.00198877 1.00043 -0.00154626
0 0 0 1
[ INFO] [1513634414.419501857, 1341848151.339013279]: Adding new points to the map
terminate called after throwing an instance of 'PointMatcherSupport::TransformationError'
what(): RigidTransformation: Error, rotation matrix is not orthogonal.