-
Notifications
You must be signed in to change notification settings - Fork 3
Hector SLAM
roscore
rosrun urg_node urg_node _ip_address:=192.168.1.11
- [Create bridge]
sudo brctl addbr br0
sudo brctl addif br0 eth1[LIDAR first]
sudo brctl addif br0 eth0[pico]
sudo ifconfig br0 192.168.1.2
[anything that isn't being used]netmask 255.255.255.0
up (this step is necessary if need to access picostation) roslaunch hector_slam_launch tutorial.launch
- Move car around and perform mapping until satisfactory.
cd [directory to save to]
rosrun map_server map_saver -f [name of file]
- Close hector slam. In order to publish to
/map
topic now:cd [map directory]
rosrun map_server map_server [yaml file name i.e. test.yaml]
- If using
rosbag
:rosbag record -O [name of file] [topic name i.e. \map]
- Close/quit rosbag record and close hector slam. Play rosbag:
rosbag play [bag file name i.e. testmap.bag]
-
cd [map directory]
rosrun map_server map_server [yaml file name i.e. test.yaml]
map_server
: takes map topic and save snapshots of these messages; primary use here is to be able to broadcast a saved map to other mapping algorithms.
While we use certain ROS packages out-of-the-box (e.g. hector_slam
), the following are modifications made to these third-party ROS packages:
-
hector_slam_launch/launch/tutorial.launch
: set sim time in ROS (realtime=false vs bag=true), transforms (make sure names are correct as used in hector_mapping) -
hector_mapping/launch/mapping_default.launch
: parameters (mainly "Frame names"; (scan would change if lidar publishes to different name topic) ) must match previous launch file; can change default resolution/size of map here as well.
Custom ROS packages are (should be) saved in ~/catkin_ws, whereas third-party packages are default installed into {CHECK PATH}