How can I use hector SLAM correctly?
Hello ROS developers,
I know that this might be a small problem but I do not know how to manage my hector SLAM launch file for my specific robot.
My tree is like: map -> base_link -> ....; map -> scanmatcher_frame; odom-> base_footprint
It should be like the following, is not it? map -> odom -> base_footprint -> base_link -> scanners; map -> scanmatcher_frame
If I am starting rviz there is no transformation between base_footprint and map. I tried it already with the following nodes "static_transform_publisher", but without success.
<node pkg="tf" type="static_transform_publisher" name="odom_to_basefootprint" args="0.0
0.0 0.0 0 0 0.0 /odom /base_footprint 100" />
<node pkg="tf" type="static_transform_publisher" name="basefootprint_base_link" args="0.0
0.0 0.0 0 0 0.0 /base_footprint /base_link 100" />
My launch file: <launch>
<arg name="open_rviz" default="true"/>
<arg name="base_frame" default="base_link"/>
<arg name="odom_frame" default="base_link"/>
<arg name="map_frame" default="map"/>
<param name="/use_sim_time" value="true"/>
<!-- Hector -->
<node pkg="hector_mapping" type="hector_mapping" name="slam_hector" output="screen">
<param name="pub_map_odom_transform" value="true"/>
<param name="base_frame" value="$(arg base_frame)"/>
<param name="odom_frame" value="$(arg odom_frame)"/>
<param name="map_frame" value="$(arg map_frame)"/>
<rosparam command="load" file="$(find slam)/config/hector_params.yaml" />
</node>
<!-- rviz -->
<group if="$(arg open_rviz)">
<node pkg="rviz" type="rviz" name="rviz" required="true"
args="-d $(find slam)/rviz/hector.rviz">
</node>
</group>
</launch>
Thank you very much!