Ask Your Question
0

scaning error for Laser Scan Matcher [closed]

asked 2019-03-16 19:48:58 -0600

hdbot gravatar image

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

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by hdbot
close date 2019-03-26 11:12:54.745561

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-18 17:25:42 -0600

hdbot gravatar image

I figured out the issues, the base_frame was wrongly written.

edit flag offensive delete link more

Comments

Can you please explain what you mean by this?

jayess gravatar imagejayess ( 2019-03-18 17:39:27 -0600 )edit

this is correct way. If you notice in my original code I had it as base_frame. So the system was confused as to while is the correct frame and it used camera as the frame. Since the camera is on angle it gave that error.

hdbot gravatar imagehdbot ( 2019-03-19 08:17:10 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-03-16 19:48:58 -0600

Seen: 161 times

Last updated: Mar 18