Robotics StackExchange | Archived questions

laserscanner sick s300 showing no map on rviz only laser scan

Hi friends, I am relatively new to ROS and trying to get to know it. I have a sick s300 laser distance sensor, I want to generate a 2D map using hector slam. So far I have the rviz in operation showing only the laserscan but not generating any map at all. I have been searching in the community and elsewhere for quite a bit and can't figure out. Any help would be really appreciated .

Here are my files below ( these files were available in the tutorial hector slam but are a bit modified by me), I have also included the mapping bag file from hector_slam tutorial in my launch file:

1 ) s300_config1.yaml

port: /dev/ttyUSB0 baud: 500000 scanduration: 0.025 scancycletime: 0.0400 scanid: 7 frameid: /baselaserlink scanintervals: [[-1.3526, 1.361357]] fields: '1': scale: 0.01 startangle: -2.355 stopangle: 2.355

2) s300_launch.launch

<!-- start laser driver -->
<node name="laser" pkg="cob_sick_s300" type="cob_sick_s300" respawn="false" output="screen">
    <rosparam command="load" file="s300_config1.yaml"/>

</node>

3) hector_map.launch

<?xml version="1.0"?>

<!-- Frame names -->
<param name="map_frame" value="map" />
<param name="base_frame" value="$(arg base_frame)" />
<param name="odom_frame" value="$(arg odom_frame)" />

<!-- Tf use -->
<param name="use_tf_scan_transformation" value="true"/>
<param name="use_tf_pose_start_estimate" value="false"/>
<param name="pub_map_odom_transform" value="$(arg pub_map_odom_transform)"/>

<!-- Map size / start point -->
<param name="map_resolution" value="0.050"/>
<param name="map_size" value="$(arg map_size)"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5" />
<param name="map_multi_res_levels" value="2" />

<!-- Map update parameters -->
<param name="update_factor_free" value="0.4"/>
<param name="update_factor_occupied" value="0.9" />    
<param name="map_update_distance_thresh" value="0.4"/>
<param name="map_update_angle_thresh" value="0.06" />
<param name="laser_z_min_value" value = "-1.0" />
<param name="laser_z_max_value" value = "1.0" />

<!-- Advertising config --> 
<param name="advertise_map_service" value="true"/>

<param name="scan_subscriber_queue_size" value="$(arg scan_subscriber_queue_size)"/>
<param name="scan_topic" value="laser/scan"/>

<param name="tf_map_scanmatch_transform_frame_name" value="$(arg tf_map_scanmatch_transform_frame_name)" />

<arg name="map_file_path" value="/home/sultan/workspace/buildingmap/Team_Hector_MappingBox_L101_Building.bag.1"/>

Using these files and scan parameters I am so far able to generate only a laserscan on rviz but no 2D map. ANy recommendations or modifications that I need to do ? Or any other reason ?

Asked by sultan.shahrukh on 2017-08-18 13:56:39 UTC

Comments

Have you included the map in RVIZ? If not already there, you need to add a 'map' visualization and connect it to the '/map' topic.

Asked by billy on 2017-08-20 12:16:00 UTC

Thank you for your reply. Yes, I have already tried doing that but it makes no difference. Any other recommendations?

Asked by sultan.shahrukh on 2017-08-21 06:59:11 UTC

Are you getting any indicators some thing is wrong, like "Dropped 100.00% of messages so far"?

Have you tried your setup with a bag file yet? You may want to try that to verify everything on ROS side is working.

When I used Hector, I found I need the robot to move and turn VERY slowly to work.

Asked by billy on 2017-08-21 12:33:48 UTC

Answers