RoboticaUtnFrba / create_autonomy

ROS autonomy stack for iRobot Create 2.
BSD 3-Clause "New" or "Revised" License
28 stars 38 forks source link

Add Hector SLAM #217

Closed FlorGrosso closed 4 years ago

FlorGrosso commented 4 years ago

Description

This PR adds Hector SLAM as a new mapping package. It enables:

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

A) Hector + Map server

export LOCALIZATION=hector_mapping
export RVIZ=true
export LASER=rplidar
roslaunch ca_gazebo create_house.launch

On another console:

roslaunch ca_tools keyboard_teleop.launch

Map the environment and when finished, save the map:

rosrun map_server map_saver -f hector_house

B) Hector + geotiff

export LOCALIZATION=hector_geotiff
export RVIZ=true
export LASER=rplidar
roslaunch ca_gazebo create_house.launch

On another console:

roslaunch ca_tools keyboard_teleop.launch

Map the environment and when finished, save the map:

roslaunch ca_hector geotiff_map_saver.launch

This will store it under ca_hector/maps with the name _ts.tif and _ts.tfw, where is the name of the environment mapped ('house' in this case).

C) Repeated A) and B) sending navigation goals to the robot instead of using teleop.

Test Configuration:

Checklist:

eborghi10 commented 4 years ago

@FlorGrosso update checklist in the PR description.

eborghi10 commented 4 years ago

I couldn't make the robot move with the first example, I got this:

[ WARN] [1593032629.741645891, 20.897000000]: Could not transform the global plan to the frame of the controller
[ERROR] [1593032629.842370228, 20.997000000]: Extrapolation Error: Lookup would require extrapolation into the future.  Requested time 20.970000000 but the latest data is at time 20.963000000, when looking up transform from frame [create1_tf/odom] to frame [map]

[ERROR] [1593032629.842409082, 20.997000000]: Global Frame: create1_tf/odom Plan Frame size 156: map

I tried to move the robot around using move_base.

Update: the same happens with the other example.

FlorGrosso commented 4 years ago

@eborghi10 I've updated this PR addressing almost all your comments, except for the issue which move base. For that, I've created this PR. Once that's merged, I'll do a next update here removing hector slam from packages.txt and adding it to .repos. Could you please take another look? Thanks!

eborghi10 commented 4 years ago

@FlorGrosso I tested it along with Hector's PR and it was working really well!! :tada: I'll approve both as soon as you address the remaining comments.

FlorGrosso commented 4 years ago

@eborghi10 all comments addressed (and one comment on a comment for you). I've updated the package to use hector slam from the updated repo instead. Ready for another view, thanks!