Ask Your Question
1

Hokuyo - No map received in RViz [closed]

asked 2014-08-28 15:17:46 -0500

anamcarvalho gravatar image

updated 2014-09-02 05:22:13 -0500

Hi everyone!

I am trying to use the package "GMapping" to visualize the map acquired with Hokuyo laser scanner!

I have no odometry, so I simulated a TF with a launch file, which worked already in other applications!

<launch>

  <node pkg="tf" type="static_transform_publisher" name="US6" args="0 7 2 1.5708 0 0 base_link laser 100" />

</launch>

When running RViz, in Global Options, the Fixed frame is map; In Grid, the Reference Frame is map; In TF I have the following warnings: No transform from [map] to [base_link] / No transform from [odom] to [base_link] In map, the topic is map and I receive this warning and error message: No map received / No transform from [] to [base_link]

What did I do wrong? I notice that if I change the Fixed Frame in Global Options and the one in Grid, the error disappear and some other errors appear... what are the correct options to be selected in Global Options and in Grid?

Thank you for your time!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by anamcarvalho
close date 2014-09-02 08:16:52.636418

2 Answers

Sort by » oldest newest most voted
1

answered 2014-09-02 06:19:01 -0500

Malefitz gravatar image

updated 2014-09-04 02:07:25 -0500

As bvbdort already mentioned, you need to also publish the base_link -> odom transform. If you don't have an odometry system, you can do it with a static transform publisher in your launch file like this:

<launch>
  <node pkg="tf" type="static_transform_publisher" name="odom_to_base_link" args="0 0 0 0 0 0 odom base_link 100" />
  <node pkg="tf" type="static_transform_publisher" name="US6" args="0 7 2 1.5708 0 0 base_link laser 100" />
</launch>

That way every transform gmapping expects to run is set up. Mind that gmapping won't really be able to extimate the position of the laser in the map, since you publish odometry information manually as a static transformation. But at least you should see a map built from your laser.

PS: If it still doesn't work that way, please provide info about what gmapping prints out.

edit flag offensive delete link more

Comments

Thank you Malefitz, it works =) now I have another question but i'll open a new one, since it isn't related with the transforms!

anamcarvalho gravatar imageanamcarvalho ( 2014-09-02 08:16:40 -0500 )edit
1

answered 2014-08-29 02:27:23 -0500

bvbdort gravatar image

For gmapping you also need transform between baselink and odom

Required tf Transforms

<the frame attached to incoming scans> → base_link

usually a fixed value, broadcast periodically by a robot_state_publisher, or a tf static_transform_publisher.

base_link → odom

usually provided by the odometry system (e.g., the driver for the mobile base)

edit flag offensive delete link more

Comments

@bvbdort Since I don't have odometry, the second transform was the one I "simulated".

For the first one, does this exact transform in the tf static_transform_publisher ros page solves? (next comment)

anamcarvalho gravatar imageanamcarvalho ( 2014-08-31 10:42:11 -0500 )edit

<launch> <node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 link1_parent link1 100"/> </launch>

what do I write in link1_broadcaster, link1_parent and link1?

anamcarvalho gravatar imageanamcarvalho ( 2014-08-31 10:42:20 -0500 )edit

base_link --> odom is not static you cant simulate this from static_transform_publisher.

bvbdort gravatar imagebvbdort ( 2014-08-31 13:32:23 -0500 )edit

But isn't that the one I already simulate?

anamcarvalho gravatar imageanamcarvalho ( 2014-08-31 13:53:58 -0500 )edit

static_transform_publisher you showed in question is between laser and base link

bvbdort gravatar imagebvbdort ( 2014-08-31 15:34:51 -0500 )edit
1

For testing purposes it is ok to publish the odometry with a static publisher. I'll write an answer for it.

Malefitz gravatar imageMalefitz ( 2014-09-02 04:08:44 -0500 )edit

Thank you @Malefitz, really appreciate it!

anamcarvalho gravatar imageanamcarvalho ( 2014-09-02 04:41:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-28 15:17:46 -0500

Seen: 2,851 times

Last updated: Sep 04 '14