I'm using ros indigo and trying to properly use hactor_mapping and _slam with turtlebot in gazebo. I couldn't find any tutorials on how to do that. Is it possible or it works best with a real turtlebot?
If it is possible to use it in simulation, are there any guides for doing that?
↧
Hector in simulation using turtlebot
↧
hector mapping with only odometry
Hi,
How to use hector_mapping to produce maps using only odometry (no scan)?
In gmapping it is doable by tuning some params. I want to compare the hector_mapping and gmapping for this case.
**Background:**
The Pepper robot comes with a poor laser which can't be used for slam purpose. A way around is to use depth sensor (Xtion) but the lense fitted in front it makes the depth image highly distorted. I am curious to know that how much accurate maps can we get using only odometry, as the robot's odometry seems reliable.
↧
↧
How to fine tune hector mapping
I'm trying to use RGB-D camera + hector_mapping to build occupancy map.
I found that no matter in real world or gazebo world, hector_mapping will sometimes suddenly jump to another position and build map there. Especially when my robot rotates.
Below two image are my gazebo world and the occupancy map build by hector_mapping.

My car started from upper left room to lower left room.
The upper left room looks good, but when my robot went through the door to lower left room, it suddenly jumped far away.

In the real world testing, this situation will happen more often.
Is there any parameter can fine tune this situation?
Or how can I debug this problem?
Here is the hector_mapping parameters I used currently.
I also have several parameters which I do not know its usage, hope someone can explain them in more detail.
~map_multi_res_levels (int, default: 3) The number of map multi-resolution grid levels. ~pub_map_scanmatch_transform (bool, default: true) Determines if the scanmatcher to map transform should be published to tf. The frame name is determined by the 'tf_map_scanmatch_transform_frame_name' parameter. ~tf_map_scanmatch_transform_frame_name (string, default: scanmatcher_frame) The frame name when publishing the scanmatcher to map transform as described in the preceding parameter. What is the scanmatcher frame and what's the usage of map multi-resolution grid?
I found that no matter in real world or gazebo world, hector_mapping will sometimes suddenly jump to another position and build map there. Especially when my robot rotates.
Below two image are my gazebo world and the occupancy map build by hector_mapping.

My car started from upper left room to lower left room.
The upper left room looks good, but when my robot went through the door to lower left room, it suddenly jumped far away.

In the real world testing, this situation will happen more often.
Is there any parameter can fine tune this situation?
Or how can I debug this problem?
Here is the hector_mapping parameters I used currently.
~map_multi_res_levels (int, default: 3) The number of map multi-resolution grid levels. ~pub_map_scanmatch_transform (bool, default: true) Determines if the scanmatcher to map transform should be published to tf. The frame name is determined by the 'tf_map_scanmatch_transform_frame_name' parameter. ~tf_map_scanmatch_transform_frame_name (string, default: scanmatcher_frame) The frame name when publishing the scanmatcher to map transform as described in the preceding parameter. What is the scanmatcher frame and what's the usage of map multi-resolution grid?
↧
Getting a 2D matrix from nav_msg/OccupancyGrid
Hello there! I am trying to "extract" a 2D matrix from OccupancyGrid data, so that i can create some random points for a pathfinding algorithm i am working on for my University Thesis, but i cant seem to find any good documentation on the subject. I am relatively new to ROS and i was wondering there are any suggestions on where i could look it up.
I running the hector_quadrotor_demo package,on ROS Indigo for Ubuntu 14.04 Trusty, and trying to get the data from the /map topic (hector_mapping package).
Any help would be greatly appreciated!
↧
Hector SLAM prerecorded map
Hello,
I'm trying to use hector SLAM for odometry on my robot. It works fine when I record laser data to a bag file and play it back at 1/4 speed. However, when running in realtime on the robot it works ok for straight lines but fails any time I try to turn.
I was wondering if there was a way to load a prerecorded map and use that for localization.
↧
↧
The hector_mapping and move_base can't work together ,but cartographer can.
Hi , all :
I want to use hector_mapping and move_base to work together on the turtlebot which has a rplidar,but when I shart up move_base to get a path planning, I find move_base continuously print the alarm information,
----------
[ WARN] [1499649044.602318070, 109.050000000]: Control loop missed its desired rate of 3.0000Hz... the loop actually took 3.1000 seconds
[ WARN] [1499649044.602556838, 109.050000000]: Map update loop missed its desired rate of 3.0000Hz... the loop actually took 2.7667 seconds
----------
which leads to the robot path planning is not smooth. The robot dosen't move. I have already reduced update_frequency, publish_frequency of global_costmap and local_costmap. I also decrease the controll frequence of planner in move base. However, move_base still continuously output the warning information. The robot dosen't move a little.
----------
PS: when I only use hector_mapping build a map, everything is ok. who can tell me why move_base print this warn and how to solve this problem ? Thanks.
**EDIT·1:**
I also tried the [cartographer-ros](https://google-cartographer-ros.readthedocs.io/en/latest/) and [karto](http://wiki.ros.org/karto) with movebase. They all worked fine.
Actually, we have monitored the usage of CPU and memory when running these SLAM packages. We have the order of consumption is **cartographer>karto>hector**.
**So we wonder why the hector mapping with the lowest usage of CPU and memory can't work together with movebase, but cartographer with the highest usage of CPU and meory can!**
Hopefully anyone give us any advices!
Many thanks!
↧
Error in rviz while using hector mapping and RPLidar
I need some help solving the following error in rviz: No tf data. Actual error: Fixed Frame [map] does not exist. I am using ROS Kinetic on Ubuntu 16.04. Below is my mapping_default.launch code:
↧
"SearchDir angle change too large" kills hector_mapping
Hi,
I've noticed that when sharp pose changes occur on my laser frame, the following error sometimes appears & kills hector_mapping:
SearchDir angle change too large
I was wondering: what exactly causes this, and if it is indeed linked to an unfeasible change of pose or laser scan data, what are the precise constraints on hector_mapping?
Thank you very much!
Ernest
↧
hector mapping before rplidar node?
First of all, thanks for your future answers.
Why if I run the rplidar node before the hector_mapping and hector_geotiff launchers I get the error:
**[ INFO] [1502821857.396404571]: lookupTransform base_link to laser timed out. Could not transform laser scan into base_frame.**
But if I run hector_mapping and hector_geotiff launchers before run the rplidar node everything is fine and I get the map?
This is my hector_mapping.launch:
thanks,
↧
↧
How to use Hector_Slam using LiDAR ONLY
Hi, I have a LiDAR, publishing sensor_msgs/LaserScan data on the /scan topic, no odometer or IMU. The LiDAR orientation is fixed and parallel to the ground. I have no idea about how to use frames in hector slam. After seeing a few posts, I came to know that there are the following frames: laser_link, base_link, base_stabilized, base_footprint, odom, nav, map. The static transform in the tutorial.launch file didn't work, so I wrote a separate publisher to publish null transforms between the frames, RViz shows no error, and some white squares, but no map. Can someone please post a detailed end to end process of implementing Hector_Slam once we have a functional /scan topic? Note that just a lidar is used.
↧
hector map static map
Hello everyone, I'm new to the forum and to ROS.
I'm trying to use hector_slam without it updating the map. The reason is I have loaded a static map via map_server, the map loads correctly but only for a few frames, after which it is replaced by hector generated map.
I modified HectorMappingRos.cpp by switching p_use_static_map. Now no new map is generated (which is good), only laser scans are shown in navViz, but the static map is still removed after a few seconds after the static map is loaded and displayed.
Is there a way to make hector mapping to listen to map_server, or to connect to mapTopic from map_server or to make it not to replace the static map at all?
Thank you,
Octavio
↧
hector mapping and naviagtion
Hi,
I have a rplidar laser scanner and use rplidar driver to obtain my /scan topic. I use the hector mapping launch file to generate a map as I dont have an IMU, and sucessfully manage to create a map.
Now I want to use this map in move_base launch fíle to navigate in the map created.
I followed the instructions here http://wiki.ros.org/navigation/Tutorials/RobotSetup, and everthing loads well without error.
My question is now where do I get the odom from (I'm actually launching the hector_mapping again, remapping the /map topic so as to not cause any interference to the one published by map serve in move base). Is this the right way?
If I do that then, the odom is connected to a different map now rather than the map I already generated.
Can any one tell me what I'm doing wrong and how to correct it please? Thanks in advance.
↧
hector_mapping map issue
Hello!
I use hector_mapping to build map using odometry and scan data. Everything is ok but when I rotate my robot after several rotates the map shifts like this.

Looking at the way the robot moves on the map, I can assume that scanmatching does not work. Work only odometry.
Here is my launch file.
What's problem?
↧
↧
How to generate /odom by only using /imu/data?
Hello guys,
I've been trying to integrate IMU data to robot_pose_ekf. However, robot_pose_ekf subscribes to an odometry topic, which in my case is not available. Our robot only has two laser scanners and no wheel odometry. hector_mapping generates the transform "odom --> base_footprint" which I use to created a fake odometry message.
So, I had /odom and /imu/data as inputs for robot_pose_ekf. It didn't work out due to timing issues between the topics.
Do you know of a ros-package which subscribes to /imu/data and publishes and odometry message?
If not, what kind of approach would be best for dealing with that? A Kalman Filter?
I'm looking for something like this:
3D Tracking with IMU
https://www.youtube.com/watch?v=6ijArKE8vKU
Thanks in advance
↧
hector_mapping and base_frame parameter setting
Hi all,
In my robot, I have base_link and base_footprint. When I use hector_mapping, should I use base_link or base_footprint for "base_frame"? Is there any difference? I have published static transform "base_link to laser" where laser is the frame id for laser scan.
↧
Robot_localization and Hector mapping
Hi guys,
I am trying to run `hector_mapping` in concomitant with `robot_localization`. I think all my configurations are correct, but for more clarity here the conf:
and then
# For parameter descriptions, please refer to the template parameter files for each node.
ekf_se_odom:
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: true
debug_out_file: /home/matteo/rover_ws/ekf_se_odom.txt
map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: odom
odom0: odom
odom0_config: [true, true, false,
false, false, false,
false, false, false,
false, false, true,
false, false, false]
odom0_queue_size: 10
odom0_nodelay: true
odom0_differential: false
odom0_relative: true
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1
twist0: gps/fix_velocity
twist0_config: [false, false, false,
false, false, false,
true, true, true,
false, false, false,
false, false, false]
twist0_queue_size: 10
twist0_nodelay: true
twist0_differential: false
twist0_relative: true
imu0: imu/data
imu0_config: [false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]
imu0_nodelay: false
imu0_differential: false
imu0_relative: true
imu0_queue_size: 10
imu0_pose_rejection_threshold: 0.8 # Note the difference in parameter names
imu0_twist_rejection_threshold: 0.8 #
imu0_linear_acceleration_rejection_threshold: 0.8 #
imu0_remove_gravitational_acceleration: true
use_control: false
process_noise_covariance: [...]
initial_estimate_covariance: [...]
ekf_se_map:
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: true
debug_out_file: /home/matteo/rover_ws/ekf_se_map.txt
map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: map
odom0: odom
odom0_config: [true, true, false,
false, false, false,
false, false, false,
false, false, true,
false, false, false]
odom0_queue_size: 10
odom0_nodelay: true
odom0_differential: false
odom0_relative: true
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1
odom1: odometry/gps
odom1_config: [true, true, true,
false, false, false,
false, false, false,
false, false, false,
false, false, false]
odom1_queue_size: 10
odom1_nodelay: true
odom1_differential: false
odom1_relative: false
twist0: gps/fix_velocity
twist0_config: [false, false, false,
false, false, false,
true, true, true,
false, false, false,
false, false, false]
twist0_queue_size: 10
twist0_nodelay: true
twist0_differential: false
twist0_relative: true
imu0: imu/data
imu0_config: [false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]
imu0_nodelay: true
imu0_differential: false
imu0_relative: false
imu0_queue_size: 10
imu0_remove_gravitational_acceleration: true
use_control: false
process_noise_covariance: [...]
initial_estimate_covariance: [...]
Finally navsat conf
frequency: 30
delay: 3.0
magnetic_declination_radians: 0.0539 # For lat/long 45.2266641° N , 11.9843053° E
yaw_offset: 0.0 # IMU reads 0 facing magnetic north, not east
# If this is true, the altitude is set to 0 in the output odometry message. Defaults to false.
zero_altitude: true
# If this is true, the transform world_frame->utm transform is broadcast for use by other nodes. Defaults to false.
broadcast_utm_transform: true
# If this is true, the utm->world_frame transform will be published instead of the world_frame->utm transform.
# Note that broadcast_utm_transform still has to be enabled. Defaults to false.
broadcast_utm_transform_as_parent_frame: true
# If this is true, all received odometry data is converted back to a lat/lon and published as a NavSatFix message as
# /gps/filtered. Defaults to false.
publish_filtered_gps: false
# If this is true, the node ignores the IMU data and gets its heading from the odometry source (typically the
# /odometry/filtered topic coming from one of robot_localization's state estimation nodes). BE CAREFUL when using this!
# The yaw value in your odometry source *must* be world-referenced, e.g., you cannot use your odometry source for yaw
# if your yaw data is based purely on integrated velocities. Defaults to false.
use_odometry_yaw: false
# If true, will retrieve the datum from the 'datum' parameter below, if available. If no 'datum' parameter exists,
# navsat_transform_node will wait until the user calls the 'datum' service with the SetDatum service message.
wait_for_datum: true
# Instead of using the first GPS location and IMU-based heading for the local-frame origin, users can specify the
# origin (datum) using this parameter. The fields in the parameter represent latitude and longitude in decimal degrees,
# and heading in radians. As navsat_transform_node assumes an ENU standard, a 0 heading corresponds to east.
#datum: [55.944904, -3.186693, 0.0]
datum: [45.2266143, 11.9842207, 0.0]
But I have a problem when running `hector_mapping` seems there is a default error between map and laser scanner. i think it is related to the tf `/map` generated by `navsat_transform_node`. I cannot see the matching between laserscan data and hector map. In the following a picture:

Can someone help me out?
↧
Extending map dynamically
Hello,
I am currently using hector_mapping to map spaces. I would like to develop the functionality to resize the map on the fly whenever my robot reaches the limits of the map. Say I start mapping with a 1024x1024 blank map but then, during the mapping process I exhaust the available pixels either by filling them all, or by reaching one of the boundaries (top, bottom, left, right). Lets say I reach the right edge of the map, I would like to resize it to say, 1920x1024 on the fly, so that I can continue mapping, without having to restart the process of feeding an empty 1920x1024 and restart mapping.
Is there a functionality like this already available? Any hints on how to implement it?
↧
↧
hector_slam with Sick TIM561
Hi,
we are working with a robot in a garage or production hall environment to test some car sensors. For mapping we tried an RPlidar (360°) with hector_mapping which is working very well out of the box. Unfortunally the RPlidar has problems to detect parts with black paint or car tires so we tried an Sick TiM561-2050101 which has an angle of 270° and better resolution.
Despite the higher frame rate (10Hz vs. 15Hz) and better resolution (0,9°/~400pts vs. 0,33°/~800pts) hector_mapping can't match the map on rotations. It's only working on very slow speeds. Mapping with linear movement seems to work on moderate speed.
We tried:
- reduce the frame rate
- reduce the number of points
- moved to a faster computer (from UDOO x86 Ultra on the robot to Intel NUC with i7 cpu)
- reduce the FOV
The laser data and slam_cloud is published with ~15Hz.
Why does it work out of the box with RPLidar but not with the Sick LIDAR?
↧
nav_msgs/OccupancyGrid topic doesn't exist
Hi, I have set up a simple subsriber like the one in [this tutorial](https://answers.ros.org/question/250143/subscribing-to-a-topic-with-python/) and am trying to use it to get data from the nav_msgs/OccupancyGrid [topic](http://docs.ros.org/api/nav_msgs/html/msg/OccupancyGrid.html). As the doc specifies, this data is in the form of an `Int8 []` so the only difference between the tutorial and my code is I replaced "String" with "Int8MultiArray"
I am running what I think is a fairly standard hector_mapping setup, and then I try and launch my subscriber node. The node launches fine and sits there forever, never receiving any messages. When I try `rostopic list` the topic is not there, despite the fact that the [documentation for hector_mapping](http://wiki.ros.org/hector_mapping#Published_Topics) says that it publishes to this nav_msgs/OccupancyGrid topic.
It seems like I'm missing something to tell hector_mapping to publish, except that using `rosrun map_server map_saver` works perfectly, so clearly the data is there. What am I doing wrong?
↧
Hector mapping laser scan limitation
I am running hector_slam package on ros indigo using urg04LX-UG01. No odometry used, only laser scan.
Everything is fine, except the map appears to be incomplete. If the laser scanner does not detect obstacles (beyond range limit [7m]), the map does not appear within the scanned range. I tried to reconfigure hokuyo_node to replace inf value with max value (7m). However, if laser_max_dist is set beyond 7m, obstacles are plotted at 7m, which is suppose to be free space. If laser_max_dist is set below 7m, the map does no appear within the scanned range.
How do plot free space in map if the obstacles is beyond laser scan limit? Gmapping is working with urg04lx well due to the maxRange and maxUrange parameters.
Is there any solution for this problem?
tq
Did i missed any parameter as in gmapping?
↧