RVIZ is unable to show the map from hector_slam
I do not have any errors. I am able to see the laserscan and it is able to detect and show the movement of the sensor. However, I am unable to see the map. I have put in the respective topics and fixed frames as many tutorials have mentioned. Can anyone help me check if anything is wrong? Thank you.
view_sick.launch file:
<launch>
<include file="$(find sick_tim)/launch/sick_tim551_2050001.launch" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find sick_tim)/ rviz/sick.rviz"/>
</launch>
hector_mapping_demo.launch file:
<launch>
<node pkg="hector
_mapping" type="hector_mapping" name="hector_mapping" output="screen">
<!-- Frame names -->
<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="base_link" />
<!-- Tf use -->
<param name="use_tf_scan_transformation" value="true"/>
<param name="use_tf_pose_start_estimate" value="false"/>
<!-- Map size / start point -->
<param name="map_resolution" value="0.05"/>
<param name="map_size" value="2048"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5" />
<param name="laser_z_min_value" value = "-1.0" />
<param name="laser_z_max_value" value = "1.0" />
<param name="map_multi_res_levels" value="2" />
<param name="map_pub_period" value="2" />
<param name="laser_min_dist" value="0.4" />
<param name="laser_max_dist" value="5.5" />
<param name="output_timing" value="false" />
<param name="pub_map_scanmatch_transform" value="true" />
<!--<param name="tf_map_scanmatch_transform_frame_name" value="scanmatcher_frame" />-->
<!-- Map update parameters -->
<param name="update_factor_free" value="0.4"/>
<param name="update_factor_occupied" value="0.7" />
<param name="map_update_distance_thresh" value="0.2"/>
<param name="map_update_angle_thresh" value="0.06" />
<!-- Advertising config -->
<param name="advertise_map_service" value="true"/>
<param name**="scan_subscriber_queue_size" value="5"/>
<param name="scan_topic" value="scan"/>
</node>
<node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 /base_link /laser 100"/>
<node pkg="rviz" type="rviz" name="rviz" args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.rviz"/>
</launch>
Command:
cd ~/catkin_make
catkin_make
roslaunch sick_tim view_sick.launch
roslaunch sick_tim hector_mapping_demo.launch
bag info:
path: 2018-10-18-11-51-00.bag
version: 2.0
duration: 31.8s
start: Oct 18 2018 11:51:01.40 (1539834661.40)
end: Oct 18 2018 11:51:33.15 (1539834693.15)
size: 79.0 MB
messages: 3253
compression: none [18/18 chunks]
types: diagnostic_msgs/DiagnosticArray [60810da900de1dd6ddd437c3503511da]
dynamic_reconfigure/Config [958f16a05573709014982821e6822580]
dynamic_reconfigure/ConfigDescription [757ce9d44ba8ddd801bb30bc456f946f]
geometry_msgs/PoseStamped [d3812c3cbc69362b77dc0b19b345f8f5]
geometry_msgs/PoseWithCovarianceStamped [953b798c0f514ff060a53a3498ce6246]
nav_msgs/MapMetaData [10cfc8a2818024d3248802c00c95f11b]
nav_msgs/OccupancyGrid [3381f2d731d4076ec5c71b0759edbe4e]
rosgraph_msgs/Log [acffd30cd6b6de30f120938c17c593fb]
sensor_msgs/LaserScan [90c7ef2dc6895d81024acba2ac42f369]
sensor_msgs/PointCloud [d8e9c3f5afbdd8a130fd1d2763945fca]
tf2_msgs/TFMessage [94810edda583a504dfda3829e70d7eec]
topics: /diagnostics 31 msgs : diagnostic_msgs/DiagnosticArray
/map 17 msgs : nav_msgs/OccupancyGrid
/map_metadata 1 msg : nav_msgs/MapMetaData
/poseupdate 479 msgs : geometry_msgs/PoseWithCovarianceStamped
/rosout 17 msgs : rosgraph_msgs/Log (5 connections)
/rosout_agg 6 msgs : rosgraph_msgs/Log
/scan 474 msgs : sensor_msgs/LaserScan
/sick_tim571_2050101/parameter_descriptions 1 msg : dynamic_reconfigure/ConfigDescription
/sick_tim571_2050101/parameter_updates 1 msg : dynamic_reconfigure/Config
/slam_cloud 482 msgs : sensor_msgs/PointCloud
/slam_out_pose 474 msgs : geometry_msgs/PoseStamped
/tf 1269 msgs : tf2_msgs/TFMessage (2 connections)
/tf_static
1 msg : tf2_msgs/TFMessage!
Are they your actuals launch files ? I don't know if it's just typos but things like
<!**--
orparam name**=
would generate errors for sure.typo typo sry
You also launch rviz twice with the same name, which launch file are you actually using ?
the bottom one
What do you get when you echo the map topic?