ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Problems with gmapping and Husky A200

asked 2016-08-22 16:23:50 -0500

Marcus Barnet gravatar image

updated 2016-08-23 02:33:21 -0500

Hi to all,

I'm trying to build a 2D map by using Husky A200, IMU and a SICK laser with ROS Indigo. The IMU sensor is places at the center of the robot while the SICK laser is placed 40 centimeters over the IMU sensor.

I moved the robot indoor for few meters and I recorded a bag file which contains different topics like:

/tf
/scan
/imu/data
/odometry/filtered
...

This is the bag file: download bag 15MB.

Then, I use these commands in order to try to build the map:

roscore
rosparam set use_sim_time true
roslaunch husky_gazebo husky_empty_world.launch 
roslaunch husky_viz view_robot.launch
rosrun gmapping slam_gmapping scan:=scan
rosbag play --clock test1.bag

When I run RVIZ, I get some errors and I can't build the map. I set /map as fixed frame. The errors are:

For frame [base_laser]: No transform to fixed frame [map]
frame [laser] does not exist

Should I use /odom as fixed frame?

I think the problem is that I don't have a tf for the laser, but I don't understand how to solve this problem. Can you help me, please?

EDIT: I already tried to use the husky gmapping demo instead of rosrun gmapping slam_gmapping scan:=scan, but I have the same problem. This is the content of the gmapping.launch file used by Husky in the navigation tutorial. Do you think the problem is in this code line:

<remap from="scan" to="$(arg scan_topic)"/> at the bottom of the file ?

<launch>

  <arg name="scan_topic" default="scan" />

  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping">
    <rosparam>
      odom_frame: odom
      base_frame: base_link
      map_frame: map

      map_update_interval: 0.5 # Publish new map

      maxUrange: 5.5 # Should be just less than sensor range
      maxRange: 6.1 # Should be just greater than sensor range
      particles: 100 # Increased from 80

      # Update frequencies
      linearUpdate: 0.3
      angularUpdate: 0.5
      temporalUpdate: 2.0
      resampleThreshold: 0.5

      # Initial Map Size
      xmin: -100.0
      ymin: -100.0
      xmax: 100.0
      ymax: 100.0
      delta: 0.05

      # All default
      sigma: 0.05
      kernelSize: 1
      lstep: 0.05
      astep: 0.05
      iterations: 5
      lsigma: 0.075
      ogain: 3.0
      lskip: 0
      llsamplerange: 0.01
      llsamplestep: 0.01
      lasamplerange: 0.005
      lasamplestep: 0.005

    </rosparam>
    <remap from="scan" to="$(arg scan_topic)"/>
  </node>
</launch>
edit retag flag offensive close merge delete

Comments

1

I have downloaded and played your bag. I realized that your /scan topic has frame id as "laser" but your tf tree has no transform from "base_link" to "laser". The error msg you saw makes sense too. You might have missed out this transform or made some mistake with the setting up of scan topic

DavidN gravatar image DavidN  ( 2016-08-23 01:40:39 -0500 )edit

For the scan topic, I only run my SICK with rosrun lms1xx LMS1xx_node _host:=192.168.1.10 without doing anything else. Can you suggest me how to create the transformation for the scan, please? I tried: rosrun tf static_transform_publisher 0 0 1 0 0 0 base_link laser 100 with no result.

Marcus Barnet gravatar image Marcus Barnet  ( 2016-08-23 02:39:03 -0500 )edit

Any tip to solve this problem?

Marcus Barnet gravatar image Marcus Barnet  ( 2016-08-23 18:28:39 -0500 )edit
1

It is a good direction to try static transform. Did you run this static transform during recording or playback? I think it s best if you do when recording. Please do so and upload the new bag. I will try to run gmapping with it

DavidN gravatar image DavidN  ( 2016-08-23 22:07:52 -0500 )edit

I run this tf: rosrun tf static_transform_publisher 0.3 0 0.4 0 0 0 base_link laser 100 while recording a new bag file. What do you think about it? Now I can see the laser in my tf tree, but it isn't working anyway.. :(

Marcus Barnet gravatar image Marcus Barnet  ( 2016-08-24 04:42:21 -0500 )edit
1

I have played your latest bag. I was able to see the map from gmapping. I used both methods (rosrun and your launch file), both are showing the map on rviz. No error is shown in the rosout of gmapping. Maybe you can try to remove and reinstall gmapping? (Im using ros indigo by the way)

DavidN gravatar image DavidN  ( 2016-08-24 06:24:27 -0500 )edit

Yes, now I'm able to build the 2D map correctly! Just a question: why I'm not able to set a navigation goal and make the robot navigate towards it inside the built map? What I have to do if I want to achieve this result? Gmapping can't do this?

Marcus Barnet gravatar image Marcus Barnet  ( 2016-08-24 07:24:11 -0500 )edit
1

This bug was fixed a while ago but never bloomed here. As for the nav goal, are just running gmapping or the gmpapping demo? move_base is used to move the robot.

tonybaltovski gravatar image tonybaltovski  ( 2016-08-24 12:46:25 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-08-25 03:29:37 -0500

Marcus Barnet gravatar image

I was able to make it work by following the suggestions given by DavidN.

roscore
rosparam set use_sim_time true
roslaunch husky_viz view_robot.launch
roslaunch husky_navigation gmapping_demo.launch 
rosbag play --clock file.bag

The bag file should also include the transformation the base_link and the laser sensor. The last command also launches move_base. I'm able to build the map, but I can't set a navigation goal inside it.

Anyway, the topic was about map building, so I will have to open another question.

edit flag offensive delete link more
0

answered 2016-08-22 19:33:03 -0500

paulbovbel gravatar image

While your use case is a little different, I'd suggest you try to adapt your configuration to the one in the husky_navigation demos ( http://wiki.ros.org/husky_navigation/... )

edit flag offensive delete link more

Comments

I added the gmapping.launch file in my first topic, do you think the problem could be the scan remapping? I was already using that demo files but I always have the same errors.

Marcus Barnet gravatar image Marcus Barnet  ( 2016-08-23 02:34:42 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-22 16:23:50 -0500

Seen: 796 times

Last updated: Aug 25 '16