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

hector_mapping does not works [closed]

asked 2012-11-29 16:48:31 -0500

Astronaut gravatar image

updated 2012-11-29 20:03:25 -0500

Hello

I tried to run the hector mapping package. But even does not shows the map in rviz. I build and make the package. Try to run with the minimum parameters the launch file . This my hector launch file

  <launch>

    <param name="/use_sim_time" value="true"/>

    <node name="rosplay" pkg="rosbag" type="play" args="/home/bojan/svn/POW/ROS/Fuerte/Data/User1/pow_freek_3_2011-04-01-14-21-48.bag       --clock"/>
    <node pkg="tf" type="static_transform_publisher" name="baselink_laser" args="0 0 0 0 0 0/base_frame/laser 10"/>
    <node name="hector_mapping" pkg="hector_mapping" type="hector_mapping" output="screen">
        <param name="pub_map_odom_transform" value="true"/>
    <param name="map_frame" value="map" />
        <param name="base_frame" value="base_link"/>
        <param name="odom_frame" value="base_link"/>

 </node>
</launch>

But it does not shows the map and not working at all. Any help??What should I set up??

This is the output of hector_mapping to the terminal

started roslaunch server http://name-desktop:44649/

SUMMARY
========

PARAMETERS
 * /hector_mapping/base_frame
 * /hector_mapping/map_frame
 * /hector_mapping/odom_frame
 * /hector_mapping/pub_map_odom_transform
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /
    baselink_laser (tf/static_transform_publisher)
    hector_mapping (hector_mapping/hector_mapping)
    rosplay (rosbag/play)

auto-starting new master
process[master]: started with pid [14546]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 7d35a048-3abe-11e2-b92b-80c16ee7a132
process[rosout-1]: started with pid [14559]
started core service [/rosout]
process[rosplay-2]: started with pid [14573]
process[baselink_laser-3]: started with pid [14589]
process[hector_mapping-4]: started with pid [14603]
HectorSM map lvl 0: cellLength: 0.025 res x:1024 res y: 1024
HectorSM map lvl 1: cellLength: 0.05 res x:512 res y: 512
HectorSM map lvl 2: cellLength: 0.1 res x:256 res y: 256
[ INFO] [1354260059.843535869]: HectorSM p_base_frame_: base_link
[ INFO] [1354260059.843649032]: HectorSM p_map_frame_: map
[ INFO] [1354260059.843685473]: HectorSM p_odom_frame_: base_link
[ INFO] [1354260059.843707664]: HectorSM p_scan_topic_: scan
[ INFO] [1354260059.843721148]: HectorSM p_use_tf_scan_transformation_: true
[ INFO] [1354260059.843747232]: HectorSM p_pub_map_odom_transform_: true
[ INFO] [1354260059.843787853]: HectorSM p_scan_subscriber_queue_size_: 5
[ INFO] [1354260059.843834434]: HectorSM p_map_pub_period_: 2.000000
[ INFO] [1354260059.843850294]: HectorSM p_update_factor_free_: 0.400000
[ INFO] [1354260059.843864499]: HectorSM p_update_factor_occupied_: 0.900000
[ INFO] [1354260059.843878381]: HectorSM p_map_update_distance_threshold_: 0.400000 
[ INFO] [1354260059.843892145]: HectorSM p_map_update_angle_threshold_: 0.900000
[ INFO] [1354260059.843906308]: HectorSM p_laser_z_min_value_: -1.000000
[ INFO] [1354260059.843920215]: HectorSM p_laser_z_max_value_: 1.000000

Error ::: lookupTransform base_link to laser timed out. Could not transform laser scan into base_frame.

This is te topic name of the laser scans

/scan

This the output of "rosnode info hector_mapping"

--------------------------------------------------------------------------------
Node [/hector_mapping]
Publications: 
 * /map_metadata [nav_msgs/MapMetaData]
 * /slam_cloud [sensor_msgs/PointCloud]
 * /rosout [rosgraph_msgs/Log]
 * /tf [tf/tfMessage]
 * /poseupdate [geometry_msgs/PoseWithCovarianceStamped]
 * /map [nav_msgs/OccupancyGrid]
 * /slam_out_pose [geometry_msgs/PoseStamped]

Subscriptions: 
 * /tf [tf/tfMessage]
 * /syscommand [unknown type]
 * /clock [rosgraph_msgs/Clock]
 * /initialpose [unknown type]
 * /scan [sensor_msgs/LaserScan]

Services: 
 * /hector_mapping/tf_frames
 * /hector_mapping/set_logger_level
 * /dynamic_map
 * /hector_mapping/get_loggers


contacting node http://bojan-desktop:42614/ ...
Pid: 14813
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS
 * topic: /tf
    * to: /hector_mapping
    * direction: outbound
    * transport: INTRAPROCESS
 * topic: /clock
    * to: /rosplay (http://bojan-desktop:52803/)
    * direction: inbound
    * transport: TCPROS
 * topic: /tf
    * to: /hector_mapping (http://bojan-desktop:42614/)
    * direction: inbound
    * transport: INTRAPROCESS
 * topic: /tf
    * to: /baselink_laser (http://bojan-desktop:54385/)
    * direction: inbound
    * transport: TCPROS
 * topic: /scan
    * to: /rosplay (http://bojan-desktop:52803/)
    * direction: inbound

I have this error in the terminal

lookupTransform base_link to laser ... (more)

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-09-01 00:56:12.723975

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-11-29 19:14:32 -0500

Please post some more info to help people make a more informed guess :) What would be interesting is:

  • Output of hector_mapping to the terminal
  • Output of "rosnode info hector_mapping"

  • The topic name of your laser scans

  • The tf tree (are there both "base_frame" and "base_link" in it? If not, you should probably set the "base_frame" and "odom_frame" parameters both to "base_link").

Also, please edit your original posting to provide further info and do not post it as an answer :)

edit flag offensive delete link more

Comments

OK. I have done it. Any help?

Astronaut gravatar image Astronaut  ( 2012-11-29 19:32:29 -0500 )edit

Next guess: Have a look here: http://answers.ros.org/question/12577/when-should-i-need-clock-parameter-on-rosbag-play/ Essentially, the "use_sim_time" parameter should be set to true and you have to play your bag with the "--clock" option.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2012-11-29 19:50:35 -0500 )edit

I have done it. This the error I got. lookupTransform base_link to laser timed out. Could not transform laser scan into base_frame.

Astronaut gravatar image Astronaut  ( 2012-11-29 19:56:51 -0500 )edit

Also change the launch file and edit the changes. But still have the error: lookupTransform base_link to laser timed out. Could not transform laser scan into base_frame.

Astronaut gravatar image Astronaut  ( 2012-11-29 20:04:22 -0500 )edit
1

Change the args for the static publisher to "0 0 0 0 0 0 /base_link /laser 100"

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2012-11-29 20:06:26 -0500 )edit

Ok. But still is not loaded the map of my bag file.

Astronaut gravatar image Astronaut  ( 2012-11-29 20:22:47 -0500 )edit

Ok. Now is working. How to visualize (publish the trajectory markers). ??

Astronaut gravatar image Astronaut  ( 2012-11-29 20:28:57 -0500 )edit

Is the hector mapping publishing the estimated robot pose?? If yes can I use it for some parameter calculation like velocity , distances to some obstaculos for example

Astronaut gravatar image Astronaut  ( 2012-11-29 22:26:31 -0500 )edit

Question Tools

Stats

Asked: 2012-11-29 16:48:31 -0500

Seen: 2,550 times

Last updated: Nov 29 '12