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

Problems linking hokuyo_node to hector_slam and showing data on rviz [closed]

asked 2015-10-21 11:13:09 -0500

andrefc gravatar image

Sorry but i'm new to ros and i'm having problems linking the data received by hokuyo_node and to hector_mapping. My goal is show the pose of the LIDAR in rviz using the data received by the hokuyo (the LIDAR isn't connected to a robot yet, it is just on a table, i'm rotating it so i cant see the laser scan in rviz). I don't know if i need to create a new package for this or if i can work without it. Can someone help me?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by andrefc
close date 2016-02-25 05:00:07.988436

1 Answer

Sort by » oldest newest most voted

answered 2015-10-22 07:27:58 -0500

donmrsir gravatar image


I am quite sure you dont need to create any node to connect Hokuyo with Hector_mapping, since there are already implemented nodes for that, for the Hokuyo you can find the driver code here.

So now the only thing you have to do is to make sure that both of your nodes have the correct configuration to work and communicate together.

First of all you have to make sure of what you need to make hector mapping work, you can find all that info in the wiki. As you can see there, for that you only need to publish the tf transformation between the link of the sensor, and the base of the robot (since you dont have a robot, i think that you should create some kind of artificial frame at the base of the sensor as base_link), for that you can use robot_state_publisher.

Then you have to make sure that the sensor is broadcasting to the same topic, the hector_mapping node is listening to. I think Hokuyo publish by default in the topic "sensor_msgs/LaserScan" , the same one that uses the Hector_mapping node, so this shouldn't be a problem. And if all of this is correct i think it should work.

Your question was not quite specific, so i dont know if this is what you were looking for. Hope this helps!!

edit flag offensive delete link more


Thank you for your answer! You were right i was not quite especific, sorry about that. I resolved my problem simply by modifying the hector_mapping launch file, changing the base_frame to "laser" and pub_map_odom_transform to "false". Now i can see in rviz the position and orientation of the laser.

andrefc gravatar image andrefc  ( 2015-10-22 10:13:27 -0500 )edit

Question Tools


Asked: 2015-10-21 11:13:09 -0500

Seen: 238 times

Last updated: Oct 22 '15