Ask Your Question
2

Sick S300 and HectorSlam

asked 2015-04-21 03:58:43 -0600

felixwatzlawik gravatar image

updated 2015-04-22 01:43:08 -0600

Hello People, I set up a System with a Sick S300 laser scanner and hector slam, since I have no odometry to give to rviz.

I am working witht the cob_sick_s300 package and hector mapping.

I tried to walk around with the laser scanner and get a map, unfortunately it doesnt work that good. I am posting a picture of the Map here.

I am also inserting my launch-files so that anybody can try it. should work out of the box EDIT:

I found the error and with this update I can provide any user an out of the box solution for the laserscanner. The error can be found in fields in the yaml file, I am posting the new one here:

port: /dev/ttyUSB0
baud: 500000
scan_duration: 0.025 #no info about that in SICK-docu, but 0.025 is believable and looks good in rviz
scan_cycle_time: 0.040 #SICK-docu says S300 scans every 40ms
inverted: false
scan_id: 7
frame_id: /camera_link
scan_intervals: [[-1.3526, 1.361357]] #[rad] these intervals are included to the scan
fields: 
 '1':
  scale: 0.01
  start_angle: -2.355
  stop_angle: 2.355
 # '2':
  #  scale: 2.0
   # start_angle: -11.0
    #stop_angle: 12.0

with this I get the following map: image description Which is pretty satisfying :) contact me if u need help! :)

s300_launch.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_config.yaml"/>

    </node>
</launch>

hector_mapping.launch

<launch>

<node pkg="tf" type="static_transform_publisher" name="map_to_scanmatcher" args="0 0 0 0 0 0 /map /hector_mapping 100"/>
<node pkg="tf" type="static_transform_publisher" name="map_to_base_footprint" args="0 0 0 0 0 0 /map /base_footprint 100"/>
<node pkg="tf" type="static_transform_publisher" name="base_footprint_to_base_link" args="0 0 0 0 0 0 /base_footprint /base_link 100"/>
<node pkg="tf" type="static_transform_publisher" name="base_link_to_base_stabilized" args="0 0 0 0 0 0 /base_link /base_stabilized 100"/>
<node pkg="tf" type="static_transform_publisher" name="base_stablized_to_base_frame" args="0 0 0 0 0 0 /base_stabilized /base_frame 100"/>
<node pkg="tf" type="static_transform_publisher" name="base_frame_to_laser_link" args="0 0 0 0 0 0 /base_frame /camera_link 100"/>
<node pkg="tf" type="static_transform_publisher" name="base_to_nav_link" args="0 0 0 0 0 0 /base_frame /nav 100"/>

 <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
  <arg name="base_frame" default="base_footprint"/>
 <param name="pub_map_odom_transform" value="true"/>
    <param name="map_frame" value="map" />
    <param name="base_frame" value="base_frame" />
    <param name="odom_frame" value="base_frame" />

 <arg name="odom_frame" default="nav"/>
  <arg name="pub_map_odom_transform" default="true"/>
  <arg name="scan_subscriber_queue_size" default="5"/>
  <arg name="scan_topic" default="laser/scan"/>
  <arg name="map_size" default="2048"/>

  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

    <!-- 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 ...
(more)
edit retag flag offensive close merge delete

Comments

Hello Feliz. Using your open invitation...

Which is pretty satisfying :) contact me if u need help! :)

I can see you are working with Hector. Could you give a look to my last question? I'm having some issues with it's performance. Thank you!

Victor Gomez gravatar imageVictor Gomez ( 2015-05-31 09:11:27 -0600 )edit

Dear feliz, i tried to create map using the above launch files and i am getting the error
ERROR: cannot launch node of type [cob_sick_s300/cob_sick_s300]: can't locate node [cob_sick_s300] in package [cob_sick_s300].. can u help me? thank u! regards krishnakumar

KrishKannan_007 gravatar imageKrishKannan_007 ( 2019-05-16 23:25:11 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-05-23 02:07:12 -0600

Omair Khalid gravatar image

Dear Felix,

We are trying to implement Hector SLAM (without odom) usign SICK LMS 200 laser range finder and we desperately need your help. We did the steps you have mentioned above making changes for LMS 200 in both the launch file and the config file but the map still doesn't update. We have tried numerous approaches but in vain.

One error that we are persistently getting is "lookupTransform base_footprint to /camera_link timed out. Could not transform laser scan into base_frame."

Here is the launch file we are using:

mapping2.launch

<launch>

 <node pkg="tf" type="static_transform_publisher" name="map_to_scanmatcher" args="0 0 0 0 0 0 /map/hector_mapping 100"/>
  <node pkg="tf" type="static_transform_publisher" name="map_to_base_footprint" args="0 0 0 0 0 0 /map /base_footprint 100"/>
   <node pkg="tf" type="static_transform_publisher" name="base_footprint_to_base_link" args="0 0 0 0 0 0 /base_footprint /base_link 100"/>
    <node pkg="tf" type="static_transform_publisher" name="base_link_to_base_stabilized" args="0 0 0 0 0 0 /base_link /base_stabilized 100"/>
   <node pkg="tf" type="static_transform_publisher" name="base_stablized_to_base_frame" args="0 0 0 0 0 0 /base_stabilized /base_frame 100"/>
   <node pkg="tf" type="static_transform_publisher" name="base_frame_to_laser_link" args="0 0 0 0 0 0 /base_frame /camera_link 100"/>
    <node pkg="tf" type="static_transform_publisher" name="base_to_nav_link" args="0 0 0 0 0 0 /base_frame /nav 100"/>

     <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
     <arg name="base_frame" default="base_footprint"/>
      <param name="pub_map_odom_transform" value="true"/>
      <param name="map_frame" value="map" />
      <param name="base_frame" value="base_frame" />
      <param name="odom_frame" value="base_frame" />

     <arg name="odom_frame" default="nav"/>
     <arg name="pub_map_odom_transform" default="true"/>
     <arg name="scan_subscriber_queue_size" default="5"/>
     <arg name="scan_topic" default="laser/scan"/>
     <arg name="map_size" default="2048"/>

 <node
     pkg="sicktoolbox_wrapper"
    type="sicklms"
    name="sicklms"
>
     <rosparam command="load" file="./Packages/hectorslam/launch/lms200_config.yaml" />
</node>

         <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

    <!-- 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="/scan"/>
 <param name="tf_map_scanmatch_transform_frame_name"   value="$(argtf_map_scanmatch_transform_frame_name)" />
   </node>
   <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch"/>
 </launch>

Here is the configuration file for SICK LMS200 laser range finder

lms200_config.yaml

port: /dev/ttyS2 baud: 38400 connect_delay: 35 scan_duration: 0.025 #no info about that in SICK-docu, but 0.025 is believable and looks good in rviz scan_cycle_time: 0.040 #SICK-docu says S300 scans every 40ms inverted: false scan_id: 7 frame_id: /camera_link scan_intervals: [[-1.5708, 1.5708]] #[rad] these intervals are included to ... (more)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-04-21 03:58:43 -0600

Seen: 1,410 times

Last updated: May 23 '16