Ask Your Question
0

Nothing shown in rviz when doing hector_slam mapping tutorial

asked 2015-04-25 05:39:55 -0600

StevenJiang gravatar image

updated 2015-04-25 07:20:29 -0600

gvdhoorn gravatar image

Hi,

Maybe my question is a bit dump because I am very new to hector slam and even to ROS. I have installed ROS and hector slam (indigo). When I was trying to do the tutorial, after I typed roslaunch hector_slam_launch tutorial.launch and press enter, Rviz started fine with no error. I can rotate the grid and saw Global Status is in red text (no data feeding into Rviz).

Then I typed rosbag play Team_Hector_MappingBox_RoboCup_2011_Rescue_Arena.bag --clock in another console and there is no error shown. I could see the [RUNNING] line being showed and I guess the data is being fed to Rviz?

However, there is nothing shown in Rviz, I can still rotate the grid but there is no map being created. Also, I saw the Global Status became green and there was a check sign. I could also see the "ROS Elapsed" at the bottom is running.

When I added a TF, I could see two coordinates moving but there is just no map.

I saved the file to an alternative path (when I clicked save it said the file cannot be open, so I have to save a copy to another path). The content of the file is shown below:

Panels:
  - Class: rviz/Displays
    Help Height: 78
    Name: Displays
    Property Tree Widget:
      Expanded:
        - /Global Options1
        - /Status1
      Splitter Ratio: 0.5
    Tree Height: 565
  - Class: rviz/Selection
    Name: Selection
  - Class: rviz/Tool Properties
    Expanded:
      - /2D Pose Estimate1
      - /2D Nav Goal1
      - /Publish Point1
    Name: Tool Properties
    Splitter Ratio: 0.588679
  - Class: rviz/Views
    Expanded:
      - /Current View1
    Name: Views
    Splitter Ratio: 0.5
  - Class: rviz/Time
    Experimental: false
    Name: Time
    SyncMode: 0
    SyncSource: ""
Visualization Manager:
  Class: ""
  Displays:
    - Alpha: 0.5
      Cell Size: 1
      Class: rviz/Grid
      Color: 160; 160; 164
      Enabled: true
      Line Style:
        Line Width: 0.03
        Value: Lines
      Name: Grid
      Normal Cell Count: 0
      Offset:
        X: 0
        Y: 0
        Z: 0
      Plane: XY
      Plane Cell Count: 10
      Reference Frame: <Fixed Frame>
      Value: true
    - Angle Tolerance: 0.1
      Class: rviz/Odometry
      Color: 255; 25; 0
      Enabled: true
      Keep: 100
      Length: 1
      Name: Odometry
      Position Tolerance: 0.1
      Topic: ""
      Value: true
    - Class: rviz/TF
      Enabled: false
      Frame Timeout: 15
      Frames:
        All Enabled: true
      Marker Scale: 1
      Name: TF
      Show Arrows: true
      Show Axes: true
      Show Names: true
      Tree:
        {}
      Update Interval: 0
      Value: false
  Enabled: true
  Global Options:
    Background Color: 48; 48; 48
    Fixed Frame: map
    Frame Rate: 30
  Name: root
  Tools:
    - Class: rviz/Interact
      Hide Inactive Objects: true
    - Class: rviz/MoveCamera
    - Class: rviz/Select
    - Class: rviz/FocusCamera
    - Class: rviz/Measure
    - Class: rviz/SetInitialPose
      Topic: /initialpose
    - Class: rviz/SetGoal
      Topic: /move_base_simple/goal
    - Class: rviz/PublishPoint
      Single click: true
      Topic: /clicked_point
  Value: true
  Views:
    Current:
      Class: rviz/Orbit
      Distance: 16.2326
      Enable Stereo Rendering:
        Stereo Eye Separation: 0.06
        Stereo Focal Distance: 1
        Swap Stereo Eyes: false
        Value: false
      Focal Point:
        X: 0
        Y: 0
        Z: 0
      Name: Current View
      Near Clip Distance: 0.01
      Pitch: 0.350399
      Target Frame: <Fixed Frame>
      Value: Orbit (rviz)
      Yaw: 0.425397
    Saved: ~
Window ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-04-27 04:35:27 -0600

Victor Gomez gravatar image

updated 2015-04-27 04:37:22 -0600

Have you checked all the Displays are correctly setup or subscribed to the proper topic??

Global Options -- map (according to your file, you already have this one)

Map -- /map (add using Topic and add /map)

Those should be the more important ones for map I think.

Best

edit flag offensive delete link more

Comments

Hi, thanks for replying.

The default setting in Global Options is 'map' which I assume is the correct one? However there is nothing shown on the grid.

Sorry I don't understand what 'Map -- /map (add using Topic and add /map)' mean (I am a newbie in ROS). Could you elaborate a bit more?

Thanks.

StevenJiang gravatar imageStevenJiang ( 2015-04-27 06:18:54 -0600 )edit
1

In the rviz window, in the left part you see Displays. Below of that you find the Global options, which you already have correctly. Below of that, you find an Add button, click it. In the new window, choose by topic and choose map. Hope it works. Let us know.

Victor Gomez gravatar imageVictor Gomez ( 2015-04-28 01:46:31 -0600 )edit

Ok it worked! Thanks a lot! But when I added a map by types, there is no map showing. What is the difference between topics and types?

StevenJiang gravatar imageStevenJiang ( 2015-04-28 22:06:08 -0600 )edit
1

When you add by topic, it automatically selects the information to be displayed. When you add by types, in the Display menu, you have to choose among the different topic that publishes to map (which in your case should only be 1). If it works now, mark the question as answered please.

Victor Gomez gravatar imageVictor Gomez ( 2015-04-29 00:23:24 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-04-25 05:31:52 -0600

Seen: 858 times

Last updated: Apr 27 '15