Skip to content

Instantly share code, notes, and snippets.

@matlabbe
matlabbe / associate.py
Last active April 16, 2023 00:32
Modified script from TUM's rgbd dataset to copy associated rgb and depth images in distinct folders "rgb_sync" and "depth_sync" (original: http://vision.in.tum.de/data/datasets/rgbd-dataset/tools)
#!/usr/bin/python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2013, Juergen Sturm, TUM
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
import rosbag
from tf.msg import tfMessage
with rosbag.Bag('output.bag', 'w') as outbag:
for topic, msg, t in rosbag.Bag('input.bag').read_messages():
if topic == "/tf" and msg.transforms:
newList = [];
for m in msg.transforms:
if m.header.frame_id != "map":
newList.append(m)
else:
@matlabbe
matlabbe / imu_brick_node.cpp
Created September 19, 2016 16:36
IMU v2 brick ROS node
#include <ros/ros.h>
#include <sensor_msgs/Imu.h>
#include <string.h>
#include "tinkerforge/ip_connection.h"
#include "tinkerforge/brick_imu_v2.h"
#define HOST "localhost"
<launch>
<!-- stereo_20Hz directory -->
<arg name="dir" default="$(env HOME)/Downloads/stereo_20Hz" />
<!-- Choose visualization -->
<arg name="rviz" default="false" />
<arg name="rtabmapviz" default="true" />
<arg name="rate" default="20" />
@matlabbe
matlabbe / BoostConfig.cmake.in
Last active April 17, 2021 17:07
Minimal Boost CMake
set(Boost_INCLUDE_DIRS @Boost_INCLUDE_DIRS@)
set(Boost_LIBRARIES @Boost_LIBRARIES@)
link_directories(@Boost_LINK_DIRS@)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} @Boost_C_FLAGS@")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} @Boost_CXX_FLAGS@")
@matlabbe
matlabbe / pcl_1_8_0_vtk_android_support.patch
Last active January 4, 2022 03:31
Patch for PCL 1.8.0 to add vtk support in android build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5fd763e3..49472ce66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -358,7 +358,7 @@ endif(WITH_QT)
# Find VTK
option(WITH_VTK "Build VTK-Visualizations" TRUE)
-if(WITH_VTK AND NOT ANDROID)
+if(WITH_VTK)
@matlabbe
matlabbe / gtsam_GKlib_android_fix.patch
Created March 20, 2017 18:33
GTSAM android patch
From 6a1c1cb56233bd4f990c72f9726167e774668d9d Mon Sep 17 00:00:00 2001
From: matlabbe <[email protected]>
Date: Mon, 20 Mar 2017 14:29:42 -0400
Subject: [PATCH] fixed metis/GKlib compilation errors for android
---
gtsam/3rdparty/metis/GKlib/GKlibSystem.cmake | 4 +++-
gtsam/3rdparty/metis/GKlib/error.c | 2 +-
gtsam/3rdparty/metis/GKlib/gk_externs.h | 1 -
gtsam/3rdparty/metis/GKlib/gk_macros.h | 2 +-
@matlabbe
matlabbe / gtsam-4.0.0-alpha2-MSVC.patch
Last active March 19, 2023 19:47
GTSAM 4.0.0 alpha2 Visual Studio fix
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 77434d135..46ce2e9a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,9 +53,9 @@ endif()
# Configurable Options
if(GTSAM_UNSTABLE_AVAILABLE)
- option(GTSAM_BUILD_UNSTABLE "Enable/Disable libgtsam_unstable" ON)
+ option(GTSAM_BUILD_UNSTABLE "Enable/Disable libgtsam_unstable" OFF)
@matlabbe
matlabbe / msckf_vio_a9386c5_ros_commented.patch
Last active September 26, 2022 22:42
MSCKF VIO patch to disable ROS stuff to be compiled inside RTAB-Map
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb741cb..14a5f7b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,8 @@ project(msckf_vio)
add_compile_options(-std=c++11)
+set(CMAKE_BUILD_TYPE Release)
+
@matlabbe
matlabbe / rtabmap-0.16.3-euroc-tool-fix.patch
Created December 25, 2018 18:42
Patch to fix rtabmap 0.16.3 build of euroc tool on c++11
diff --git a/tools/EurocDataset/main.cpp b/tools/EurocDataset/main.cpp
index 26e633b..4e8a3d0 100644
--- a/tools/EurocDataset/main.cpp
+++ b/tools/EurocDataset/main.cpp
@@ -44,6 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <yaml-cpp/yaml.h>
#include <stdio.h>
#include <signal.h>
+#include <fstream>