├── .gitignore ├── LICENSE ├── README.md ├── blam_mosaic.png ├── external └── blam-external.rosinstall ├── internal └── blam-internal.rosinstall ├── update └── workon /.gitignore: -------------------------------------------------------------------------------- 1 | # ROS files and directories 2 | external/build 3 | external/devel 4 | external/src 5 | external/build_isolated 6 | external/devel_isolated 7 | external/install_isolated 8 | internal/build 9 | internal/devel 10 | internal/src 11 | *.catkin_workspace 12 | 13 | # Swap files 14 | *.swp 15 | *.swo 16 | *~ 17 | 18 | # Glog log files 19 | *.log* 20 | *.INFO 21 | 22 | # OSX dir files 23 | .DS_store 24 | 25 | # Compiled object files 26 | *.slo 27 | *.lo 28 | *.o 29 | 30 | # Compiled dynamic and static libraries 31 | *.so 32 | *.dylib 33 | *.la 34 | *.a 35 | 36 | # Video files 37 | *.mp4 38 | *.MOV 39 | *.mov 40 | 41 | # CSV files 42 | *.csv 43 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, The Regents of the University of California (Regents). 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above 12 | copyright notice, this list of conditions and the following 13 | disclaimer in the documentation and/or other materials provided 14 | with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived 18 | from this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 24 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | POSSIBILITY OF SUCH DAMAGE. 31 | 32 | Please contact the author(s) of this library if you have any questions. 33 | Author: Erik Nelson ( eanelson@eecs.berkeley.edu ) 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # B(erkeley) L(ocalization) A(nd) M(apping)! 2 | 3 | ![alt text](https://github.com/erik-nelson/blam/raw/master/blam_mosaic.png) 4 | 5 | ***BLAM!*** is an open-source software package for LiDAR-based real-time 3D localization and mapping. ***BLAM!*** is developed by Erik Nelson from the Berkeley AI Research Laboratory ([BAIR](http://bair.berkeley.edu)). See https://youtu.be/08GTGfNneCI for a video example. 6 | 7 | ## Build Instructions 8 | This repository contains two ROS workspaces (one internal, one external). The build process is proctored by the `update` script. To build, first make sure that you do not have any other ROS workspaces in your `ROS_PACKAGE_PATH`, then clone the repository and from the top directory execute 9 | 10 | ```bash 11 | ./update 12 | ``` 13 | 14 | ## Run Instructions 15 | ***BLAM!*** is written in C++ with some Python interface elements, wrapped by 16 | Robot Operating System ([ROS](http://ros.org)). Input LiDAR data should be 17 | provided to the `/velodyne_points` topic using message type `sensor_msgs::PointCloud2`. 18 | 19 | To run in online mode (e.g. by replaying a bag file from another terminal or 20 | using a real-time sensor stream), use 21 | 22 | ```bash 23 | roslaunch blam_example test_online.launch 24 | ``` 25 | 26 | To run in offline mode, i.e. by loading a bagfile and processing its data as 27 | fast as possible, set the bagfile name and scan topic in 28 | `blam_example/launch/test_offline.launch`, and use 29 | 30 | ```bash 31 | roslaunch blam_example test_offline.launch 32 | ``` 33 | 34 | An example .rviz configuration file is provided under 35 | `blam_example/rviz/lidar_slam.rviz`. 36 | 37 | ## Dependencies 38 | 39 | ***BLAM!*** relies on system installations of the following packages: 40 | 41 | * [ROS](http://wiki.ros.org/ROS/Installation) 42 | * [GTSAM](https://collab.cc.gatech.edu/borg/gtsam) 43 | 44 | GTSAM in particular should be installed from source using the latest version of the develop branch from https://bitbucket.org/gtborg/gtsam. GTSAM relies on Boost, an incorrect version of which will interfere with some of ROS' packages if ROS is not upgraded to at least Indigo. ROS Indigo, in turn, relies on Ubuntu 14.04. 45 | -------------------------------------------------------------------------------- /blam_mosaic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erik-nelson/blam/27f06a9ca188fca5f4e1337375561a80e53d25fc/blam_mosaic.png -------------------------------------------------------------------------------- /external/blam-external.rosinstall: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erik-nelson/blam/27f06a9ca188fca5f4e1337375561a80e53d25fc/external/blam-external.rosinstall -------------------------------------------------------------------------------- /internal/blam-internal.rosinstall: -------------------------------------------------------------------------------- 1 | - git: 2 | local-name: geometry_utils 3 | uri: https://github.com/erik-nelson/geometry_utils.git 4 | version: master 5 | - git: 6 | local-name: parameter_utils 7 | uri: https://github.com/erik-nelson/parameter_utils.git 8 | version: master 9 | - git: 10 | local-name: measurement_synchronizer 11 | uri: https://github.com/erik-nelson/measurement_synchronizer.git 12 | version: master 13 | - git: 14 | local-name: point_cloud_filter 15 | uri: https://github.com/erik-nelson/point_cloud_filter.git 16 | version: master 17 | - git: 18 | local-name: point_cloud_localization 19 | uri: https://github.com/erik-nelson/point_cloud_localization.git 20 | version: master 21 | - git: 22 | local-name: point_cloud_mapper 23 | uri: https://github.com/erik-nelson/point_cloud_mapper.git 24 | version: master 25 | - git: 26 | local-name: point_cloud_odometry 27 | uri: https://github.com/erik-nelson/point_cloud_odometry.git 28 | version: master 29 | - git: 30 | local-name: point_cloud_visualizer 31 | uri: https://github.com/erik-nelson/point_cloud_visualizer.git 32 | version: master 33 | - git: 34 | local-name: blam_slam 35 | uri: https://github.com/erik-nelson/blam_slam.git 36 | version: master 37 | - git: 38 | local-name: blam_example 39 | uri: https://github.com/erik-nelson/blam_example.git 40 | version: master 41 | - git: 42 | local-name: laser_loop_closure 43 | uri: https://github.com/erik-nelson/laser_loop_closure.git 44 | version: master 45 | - git: 46 | local-name: pose_graph_msgs 47 | uri: https://github.com/erik-nelson/pose_graph_msgs.git 48 | version: master 49 | -------------------------------------------------------------------------------- /update: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TOP_DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | # Compile third party packages. 6 | cd ${TOP_DIR}/external 7 | echo 'Creating a ROS workspace for third party packages.' 8 | if [ ! -d "./src" ]; then 9 | wstool init src 10 | fi 11 | wstool merge -t src blam-external.rosinstall 12 | wstool up -t src 13 | catkin_make_isolated --install --cmake-args -DCMAKE_BUILD_TYPE=Release 14 | if [ ! -d "./install_isolated" ]; then 15 | touch ${TOP_DIR}/external/install_isolated/.catkin 16 | source ${TOP_DIR}/external/install_isolated/setup.bash 17 | fi 18 | 19 | # Compile BLAM packages. 20 | cd ${TOP_DIR}/internal 21 | echo 'Creating a ROS workspace for BLAM packages.' 22 | if [ ! -d "./src" ]; then 23 | wstool init src 24 | fi 25 | wstool merge -t src blam-internal.rosinstall 26 | wstool up -t src 27 | catkin_make --cmake-args -DCMAKE_BUILD_TYPE=Release 28 | source ${TOP_DIR}/internal/devel/setup.bash --extend 29 | -------------------------------------------------------------------------------- /workon: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TOP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | source ${TOP_DIR}/external/install_isolated/setup.bash 5 | source ${TOP_DIR}/internal/devel/setup.bash --extend 6 | --------------------------------------------------------------------------------