Skip to content

Commit a6827da

Browse files
committed
Merge branch 'master' of github.mit.edu:SPARK/spark_vio_ros into fix/make_vio_work_on_tesse
* 'master' of github.mit.edu:SPARK/spark_vio_ros: (28 commits) Fix gif Center gif Add demo gif Add comments about mesh_rviz_plugins Update Readme Update Readme Update Readme Improve Readme Update Readme Update Readme Make autoninitialize default to IMU: no gt init available sim true only if online update launch file for filtered bag redelete deleted part in readme update readme update readme update readme for kitti Update readme Update README.md Update README.md ...
2 parents 0637f51 + 1457bd6 commit a6827da

File tree

10 files changed

+253
-122
lines changed

10 files changed

+253
-122
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Error report
3+
about: Fill this out and upload your data (!!)
4+
5+
---
6+
7+
**Description:**
8+
9+
10+
**Command:**
11+
```
12+
# replace this line with the command(s) you used
13+
```
14+
15+
**Console output:**
16+
```
17+
18+
# remove this line and paste your console output HERE - no screenshots please
19+
20+
```
21+
22+
**Additional files:**
23+
Please attach all the files needed to reproduce the error.
24+
25+
Please give also the following information:
26+
* SparkVio branch, tag or commit used
27+
* GTSAM version used:
28+
* OpenGV version used:
29+
* OpenCV version used: type `opencv_version`
30+
* Operating system and version (e.g. Ubuntu 16.04 or Windows 10):
31+
* Did you change the source code? (yes / no):
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is.
9+
Ex. I'm always frustrated when [...]
10+
11+
**Describe the solution you'd like**
12+
A clear and concise description of what you want to happen.
13+
14+
**Describe alternatives you've considered**
15+
A clear and concise description of any alternative solutions or features you've considered.
16+
17+
**Additional context**
18+
Add any other context or screenshots about the feature request here.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Question about a concept
3+
about: Ask a question about theory, API, etc.
4+
5+
---
6+
7+

LICENSE.BSD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Copyright 2019 Massachusetts Institute of Technology.
2+
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
5+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
7+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8+
9+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10+

README.md

Lines changed: 82 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
1-
# SPARK_VIO_ROS
2-
ROS Wrapper for [SPARK VIO](https://github.mit.edu/SPARK/VIO).
1+
# SparkVIO_ROS
32

4-
# Requirements
3+
ROS Wrapper for [SparkVIO](https://github.mit.edu/SPARK/VIO).
54

6-
Install [ROS Desktop-Full Install](http://wiki.ros.org/kinetic/Installation), below we prodive installation instructions for :
7-
```
8-
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
9-
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
10-
sudo apt-get update
11-
# Install ROS distribution depending on your system: Ubuntu 14.04 -> kinetic, 16.04 -> melodic
12-
sudo apt-get install ros-melodic-desktop-full
13-
```
5+
<div align="center">
6+
<img src="docs/media/SparkVIO_ROS_mesh.gif">
7+
</div>
148

15-
Install catkin tools.
9+
# 1. Installation
1610

17-
# Installation
18-
If you have [Spark VIO](https://github.mit.edu/SPARK/VIO) installed and built, installation should just be:
11+
## A. Prerequisities
1912

20-
```
13+
### i. ROS
14+
15+
Install ROS by following [our reference](./docs/ros_installation.md), or the official [ROS website](https://www.ros.org/install/).
16+
17+
### ii. SparkVIO's dependencies
18+
19+
Follow installation instructions in [SparkVIO](https://github.mit.edu/SPARK/VIO/blob/master/docs/sparkvio_installation.md).
20+
Make sure you install **SparkVIO's dependencies**: GTSAM, OpenCV, OpenGV.
21+
22+
SparkVIO itself can be installed by cloning the **[SparkVIO catkin wrapper](https://github.mit.edu/SPARK/spark_vio_catkin)** in your catkin workspace, so you can spare installing SparkVIO from source (its dependencies must be installed anyway).
23+
24+
## B. SparkVIO ROS wrapper Installation
25+
26+
If you have the above prerequisities and [SparkVIO](https://github.mit.edu/SPARK/VIO) installed and built, installation of the SparkVIO ROS wrapper should be:
27+
28+
```bash
2129
# Setup catkin workspace
2230
mkdir -p ~/catkin_ws/src
2331
cd ~/catkin_ws/
@@ -27,64 +35,80 @@ catkin init
2735
echo 'source ~/catkin_ws/devel/setup.bash' >> ~/.bashrc
2836

2937
# Clone repo
30-
cd src
38+
cd ~/catkin_ws/src
3139
git clone [email protected]:SPARK/spark_vio_ros.git
3240

3341
# Install dependencies from rosinstall file using wstool
3442
wstool init
3543
wstool merge spark_vio_ros/install/spark_vio.rosinstall
3644
wstool update
45+
```
46+
47+
Clone [SparkVIO catkin wrapper](https://github.mit.edu/SPARK/spark_vio_catkin) (**only if you haven't installed SparkVIO from source**).
48+
```bash
49+
# Clone SparkVIO catkin wrapper, useful if you don't want to build spark vio from source.
50+
git clone [email protected]:SPARK/spark_vio_catkin.git
51+
```
52+
53+
Finally, compile:
3754

55+
```bash
3856
# Compile code
3957
catkin build
4058

4159
# Refresh workspace
4260
source ~/.bashrc
4361
```
4462

45-
# Usage
46-
- Download the EuRoC dataset. (TODO provide a sliced rosbag of EUROC V1_01 for testing.)
47-
48-
## Online
49-
50-
- To run:
51-
- In one terminal, launch the spark vio ROS wrapper:
63+
# 2. Usage
64+
Download a [Euroc](https://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets) rosbag: for example [V1_01_easy](http://robotics.ethz.ch/~asl-datasets/ijrr_euroc_mav_dataset/vicon_room1/V1_01_easy/V1_01_easy.bag).
65+
66+
## Online
67+
1. As a general good practice, open a new terminal and run: `roscore`
68+
69+
2. In another terminal, launch SparkVIO ROS wrapper:
70+
```bash
71+
roslaunch spark_vio_ros spark_vio_ros_euroc.launch
72+
```
73+
74+
3. In another terminal, launch rviz for visualization:
75+
```bash
76+
rviz -d $(rospack find spark_vio_ros)/rviz/spark_vio_euroc.rviz
77+
```
78+
> Note: this rviz configuration makes use of a rviz plugin: [mesh_rviz_plugins](https://github.com/ToniRV/mesh_rviz_plugins). To visualize the textured 3D mesh, clone this plugin to your catkin workspace and catkin build it (note that this should be done automatically via `wstool`).
79+
80+
4. Finally, in another terminal, launch the downloaded Euroc rosbag:
81+
```bash
82+
rosbag play --clock /PATH/TO/EUROC_ROSBAG
83+
```
84+
85+
> Note that you will need to both source ROS and your `catkin_ws` for each new terminal unless you added the following lines to your `~/.bashrc` file:
86+
> ```bash
87+
> source /opt/ros/melodic/setup.bash # Change `melodic` for your ROS distribution.
88+
> source ~/catkin_ws/devel/setup.bash # Change `bash` to the shell you use.
89+
> ```
90+
91+
## Offline
92+
In this mode, the provided rosbag will be first parsed and then sent to the VIO for processing.
93+
This is particularly useful when debugging to avoid potential ROS networking issues.
94+
- To run, launch the SparkVIO ROS wrapper with the `online` parameter set to `false` and specify the rosbag's path:
95+
```bash
96+
roslaunch spark_vio_ros spark_vio_ros_euroc.launch online:=false rosbag_path:="PATH/TO/ROSBAG"
97+
```
98+
99+
## Other datasets
100+
The launch file and parameters can also be configured for other datasets. For example, here we provide a [kitti rosbag for testing](https://drive.google.com/drive/folders/1mPdc1XFa5y1NrZtffYTkrkGaxj5wvX0T?usp=sharing). To run, in one terminal, launch the spark vio ROS wrapper with the launch file we configured for kitti:
52101
```
53-
roslaunch spark_vio_ros spark_vio_ros_euroc.launch
102+
roslaunch spark_vio_ros spark_vio_ros_kitti.launch
54103
```
55-
- In another terminal, launch a Euroc rosbag:
104+
- In another terminal, launch a Kitti rosbag:
56105
```
57-
rosbag play /path/to/euroc_rosbag --clock
106+
rosbag play --clock /PATH/TO/KITTI_ROSBAG
58107
```
59-
60-
## Offline
61-
In this mode, the provided rosbag will be first parsed and then sent to the VIO for processing.
62-
This is particularly useful when debugging to avoid potential ROS networking issues.
63-
- To run:
64-
- Open a new terminal and launch the Spark VIO ROS wrapper with the `online` parameter set to `false`:
65-
```
66-
roslaunch spark_vio_ros spark_vio_ros_euroc.launch online:=false
67-
```
68-
69-
70-
## Custom
71-
To use your own dataset, you can copy the param/EuRoC folder and exchange all the values within the folder to those corresponding to your dataset (calibration, topic name, tracker/vio values, etc. ). Then, copy the launch file and just exchange the argument for dataset name to the name of your new folder.
72-
73-
For debugging, the VERBOSITY argument in the launch file can be toggled.
74-
75-
You can also run this offline (the rosbag is parsed before starting the pipeline). To do this, type
76-
```
77-
roslaunch spark_vio_ros spark_vio_ros_euroc_offline.launch data:="<path-to-rosbag>"
78-
```
79-
You can use your own dataset, as explained above.
80-
81-
# ToDo
82-
Check Issues and Projects tabs.
83-
84-
# Notes/FAQ
85-
One possible source of confusion is the DUMMY_DATASET_PATH argument. This is needed because of the way the SparkVio architecture is currently setup. More precisely, it requires the ETH Parser to be passed into the pipeline, so the quick way around it is to give it a dummy eth dataset (placed in the temp folder), that it doesn't really use.
86-
87-
Another thing to note is that in regularVioParameters.yaml, autoinitialize needs to be set to 1, otherwise the pipeline will initialize according to the ground truth in the dummy data.
108+
- In rviz, you can use the provided config file provided at spark_vio_ros/rviz/sparkvio_kitti.rviz
109+
```bash
110+
rviz -d $(rospack find spark_vio_ros)/rviz/spark_vio_kitti.rviz
111+
```
88112
89113
# Hardware use
90114
## RealSense D435i (Infrared)
@@ -159,3 +183,6 @@ roslaunch spark_vio_ros spark_vio_ros_mynteye.launch camera:=JPL distortion:=equ
159183
Options for camera are ```MIT``` and ```JPL```. Options for distortion are ```equidistant``` and ```radtan```.
160184
161185
Same goes for use offline, using the ```spark_vio_ros_mynteye_offline.launch``` file and an additional ```data``` argument with path to bagfile.
186+
187+
# BSD License
188+
SparkVIO ROS wrapper is open source under the BSD license, see the [LICENSE.BSD](./LICENSE.BSD) file.

docs/media/SparkVIO_ROS_mesh.gif

21.8 MB
Loading

docs/ros_installation.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## ROS installation
2+
3+
Install [ROS Desktop-Full Install](http://wiki.ros.org/kinetic/Installation), below we prodive installation instructions:
4+
```
5+
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
6+
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
7+
sudo apt-get update
8+
```
9+
10+
Now, you can install the ROS distribution corresponding to your system.
11+
12+
- If you have **Ubuntu 14.04**, run:
13+
```
14+
# Install ROS distribution depending on your system: Ubuntu 14.04 -> kinetic, 16.04 -> melodic
15+
sudo apt-get install ros-kinetic-desktop-full
16+
# Automatically source ROS for convenience:
17+
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
18+
source ~/.bashrc
19+
```
20+
21+
- Otherwise, if you have **Ubuntu 16.04**, run:
22+
```
23+
# Install ROS distribution depending on your system: Ubuntu 14.04 -> kinetic, 16.04 -> melodic
24+
sudo apt-get install ros-melodic-desktop-full
25+
# Automatically source ROS for convenience:
26+
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
27+
source ~/.bashrc
28+
```
29+
30+
Now, initialize rosdep:
31+
```
32+
sudo rosdep init
33+
rosdep update
34+
```
35+
36+
Finally, install dependencies for building packages and catkin tools:
37+
```
38+
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential python-catkin-tools
39+
```

launch/spark_vio_ros_kitti.launch

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@
1010
<arg name="log_gt_data" default="false"/>
1111
<arg name="gt_topic" default=""
1212
if="$(arg log_gt_data)"/>
13+
<!-- Set use_sim_time to true if you use rosbag with clock argument -->
14+
<param name="use_sim_time" value="true" if="$(arg online)"/>
1315

1416
<!-- Only used when parsing a rosbag -->
1517
<arg name="rosbag_path" default="/home/yunchang/data/kitti_2011_09_26_drive_0005_unsynced.bag"
1618
unless="$(arg online)"/>
1719

20+
<!-- Launch static TF node from base_link to velo_link -->
21+
<node pkg="tf" type="static_transform_publisher" name="velo_link_broadcaster"
22+
args="0 0 0 0 0 0 1 base_link velo_link 100"/>
23+
1824
<!-- Subscribed Topics -->
1925
<arg name="left_cam_topic" value="/kitti/camera_gray_left/image_raw"/>
2026
<arg name="right_cam_topic" value="/kitti/camera_gray_right/image_raw"/>

0 commit comments

Comments
 (0)