is robot-localization in AMCL necessary for laser_scan_matcher + imu?
Hi,
I am using a YDLidar X2L + MPU9250 for localization in AMCL.
I'd like to clarify whether an ekf using robot-localization between the PoseWithCovarianceStamped output of laserscanmatcher and Imu output of imufiltermadgwick is necessary if i use laserscanmatcher with param use_imu = true?
Here is the launch file:
<launch>
<!-- Arguments -->
<arg name="model" default="$(find mobile_base_arm)/urdf/mobile_base_arm.urdf"/>
<param
name="robot_description"
textfile="$(find mobile_base_arm)/urdf/mobile_base_arm.urdf" />
<arg name="map_file" default="$(find navigation)/maps/test_map.yaml"/>
<arg name="open_rviz" default="true"/>
<arg name="move_forward_only" default="false"/>
(launch parameters for lidar)
(launch parameters for rosserial)
<node name="imu_filter_madgwick" pkg="imu_filter_madgwick" type="imu_filter_node" output="screen" respawn="false" >
<param name="world_frame" value="enu" />
<param name="fixed_frame" value="odom" />
<param name="use_mag" value="false" />
<param name="use_magnetic_field_msg" value="false" />
<param name="publish_tf" value="false" />
<param name="stateless" value="false" />
</node>
<node pkg="laser_scan_matcher" type="laser_scan_matcher_node" name="laser_scan_matcher_node" output="screen">
<param name="fixed_frame" value = "odom"/>
<param name="base_frame" value = "base_link"/>
<param name="use_odom" value = "false"/>
<param name="use_imu" value="true"/>
<param name="do_compute_covariance" value="1"/>
<param name="publish_tf" value = "false"/>
<param name="publish_pose_with_covariance" value="false"/>
<param name="publish_pose_with_covariance_stamped" value="true"/>
</node>
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true">
<param name="two_d_mode" value="true"/>
<param name="odom_frame" value="odom"/>
<param name="base_link_frame" value="base_link"/>
<param name="world_frame" value="odom"/>
<param name="imu0" value="imu/data"/>
<rosparam param="imu0_config">[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]</rosparam>
<param name="imu0_remove_gravitational_acceleration" value="true"/>
<param name="pose0" value="pose_with_covariance_stamped"/>
<rosparam param="pose0_config">[true, true, true,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>
</node>
(launch joint_state_publisher, robot_state_publisher, map_server)
<!-- AMCL -->
<include file="$(find navigation)/launch/amcl.launch"/>
(launch rviz)
</launch>
Using this launch file, my odom frame is rotated from the map by -90 degrees z axis, so when i move my robot forward (x axis), it will move forward in odom's x axis, i.e. it is sliding sideways in the map axis.
When I remove robot-localization and use the odom from laserscanmatcher, everything works as expected.
OR am i supposed to use laserscanmatcher to publish odom (publishtf=true), then use fuse IMU with the odom just from laserscan_matcher?
Asked by MrOCW on 2022-02-09 14:49:17 UTC
Comments
hi, which driver are you using for the IMU?
Asked by sal on 2022-04-17 14:04:43 UTC