Hello,
I am using ZED camera and the wheel odometry, fused together with robot_localization. My code uses laser_scan_matcher with gmapping to build the map of the environment. I am using deptimage_to_laserscan to convert 3D point cloud to 2D laser scan.
<launch>
<!--EKF Launch -->
<include file="$(find robot_localization)/launch/EKF_Odom.launch" />
<!--Zed Camera Launch -->
<include file="$(find zed_wrapper)/launch/zed.launch" />
<arg name="base_frame" default="zed_camera_center"/>
<!-- Depth_image to Laser_Scan -->
<node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan">
<param name="scan_height" value="100"/>
<param name="output_frame_id" value="$(arg base_frame)"/>
<param name="range_min" value="0.3"/>
<param name="range_max" value="60"/>
<remap from="image" to="/zed/depth/depth_registered"/>
<remap from="scan" to ="/scan"/>
</node>
<!-- Laser Scan Match -->
<node pkg="laser_scan_matcher" type="laser_scan_matcher_node" name="laser_scan_matcher_node" output="screen">
<param name="fixed_frame" value = "world"/>
<param name="base_frame" value="wheelchair_base"/>
<param name="use_alpha_beta" value="false"/>
<param name="use_odom" value="true"/>
<param name="use_imu" value="false"/>
<param name="max_iterations" value="10"/>
<param name="publish_pose" value="true"/>
<param name="publish_tf" value="false"/>
<param name="use_vel" value="false"/>
</node>
<!-- Gmapping -->
<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
<param name="map_udpate_interval" value="2.0"/>
<param name="delta" value="0.02"/>
<param name="base_frame" value="base_frame"/>
</node>
<!--RVIZ launch -->
<node pkg="rviz" type="rviz" name="rviz"/>
</launch>
This is my launch file. When I launch it I get error:
[ WARN] [1552782652.945326528]: Laser has to be mounted planar! Z-coordinate has to be 1 or -1, but gave: 1.14000
icp_loop: failed: after trimming, only 51 correspondences.
icp: ICP failed for some reason.
[ WARN] [1552782652.949929738]: Error in scan matching
[ WARN] [1552782652.978282773]: Laser has to be mounted planar! Z-coordinate has to be 1 or -1, but gave: 1.14000
Any idea how I can fix this? Any suggestions are appreciated.
Thanks, Hdbot
Originally posted by hdbot on ROS Answers with karma: 36 on 2019-03-16
Post score: 0