Skip to content

Instantly share code, notes, and snippets.

@matlabbe
matlabbe / orbslam2_f2e6f51_marchnative_disabled.patch
Created December 27, 2018 04:16
ORB_SLAM2 patch to disable -march=native
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08a8af4..8190289 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,8 +7,8 @@ ENDIF()
MESSAGE("Build type: " ${CMAKE_BUILD_TYPE})
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -march=native ")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3 -march=native")
@matlabbe
matlabbe / okvis_1dce912_marchnative_disabled.patch
Last active March 20, 2019 16:48
OKVIS with -march=native disabled and use shared libraries
diff --git a/.gitignore b/.gitignore
index 7ee7366..f764f90 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,5 @@
# Docu
documentation/html/
+
+build
@matlabbe
matlabbe / pointcloud_to_laserscan_nodelet_indigo.patch
Created January 26, 2019 01:59
Fixing pointcloud_to_laserscan build from indigo_devel branch into recent ros distros
diff --git a/src/pointcloud_to_laserscan_nodelet.cpp b/src/pointcloud_to_laserscan_nodelet.cpp
index 3411d45..5918f0b 100644
--- a/src/pointcloud_to_laserscan_nodelet.cpp
+++ b/src/pointcloud_to_laserscan_nodelet.cpp
@@ -238,4 +238,4 @@ namespace pointcloud_to_laserscan
}
-PLUGINLIB_DECLARE_CLASS(pointcloud_to_laserscan, PointCloudToLaserScanNodelet, pointcloud_to_laserscan::PointCloudToLaserScanNodelet, nodelet::Nodelet);
+PLUGINLIB_EXPORT_CLASS(pointcloud_to_laserscan::PointCloudToLaserScanNodelet, nodelet::Nodelet);
@matlabbe
matlabbe / vins-fusion_be55a93_pull136.patch
Last active January 8, 2023 23:06
VINS-Fusion patch to use it as library from external project
diff --git a/vins_estimator/CMakeLists.txt b/vins_estimator/CMakeLists.txt
index 8735939..3f7c8d7 100644
--- a/vins_estimator/CMakeLists.txt
+++ b/vins_estimator/CMakeLists.txt
@@ -31,7 +31,18 @@ include_directories(
${EIGEN3_INCLUDE_DIR}
)
-catkin_package()
+catkin_package(
@matlabbe
matlabbe / tum_rename_world_kinect_frame.py
Created March 20, 2019 20:35
Script used to rename /world -> /kinect frame to /world -> /kinect_gt to be more friendly with SLAM approaches that estimate /map -> /kinect
import rosbag
import sys
import os
from tf.msg import tfMessage
if len(sys.argv) < 1:
print 'Usage example: tum_rename_world_kinect_frame.py rgbd_dataset_freiburg3_long_office_household.bag'
exit
os.rename(sys.argv[1], sys.argv[1] + '.tmp')
@matlabbe
matlabbe / alice_vision_eigen.patch
Last active August 11, 2021 09:41
Patch for AliceVision integration in RTAB-Map
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7ea43b504..b86462767 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -334,8 +334,8 @@ if(Eigen3_FOUND OR EIGEN3_FOUND)
# message(FATAL_ERROR "EIGEN_INCLUDE_DIR: ${EIGEN_INCLUDE_DIR}")
include_directories(${EIGEN_INCLUDE_DIR})
# See https://eigen.tuxfamily.org/dox/group__TopicUnalignedArrayAssert.html
- add_definitions("-DEIGEN_DONT_ALIGN_STATICALLY=1")
- add_definitions("-DEIGEN_DONT_VECTORIZE=1")
@matlabbe
matlabbe / republish_tf_static.py
Last active January 27, 2020 23:44
Fix /tf_static not latched when replaying a rosbag (see https://answers.ros.org/question/207551/how-to-save-static-transforms-in-bag-files/?answer=207647#post-id-207647). Start this script before running a rosbag, then do: `rosbag play --clock tf_static:=tf_static_old`
#!/usr/bin/env python
import rospy
from tf2_msgs.msg import TFMessage
def callback(data):
rospy.loginfo("Received /tf_static_old and republising latched /tf_static")
pub.publish(data)
if __name__ == '__main__':
rospy.init_node('listener', anonymous=True)
@matlabbe
matlabbe / os1_fix.patch
Created March 2, 2020 19:52
Ouster fix to use host timestamp and imu gravity inverted
diff --git a/ouster_ros/src/os1_cloud_node.cpp b/ouster_ros/src/os1_cloud_node.cpp
index 8a7e8ec..964cfa6 100644
--- a/ouster_ros/src/os1_cloud_node.cpp
+++ b/ouster_ros/src/os1_cloud_node.cpp
@@ -59,6 +59,7 @@ int main(int argc, char** argv) {
[&](uint64_t scan_ts) mutable {
msg = ouster_ros::OS1::cloud_to_cloud_msg(
cloud, std::chrono::nanoseconds{scan_ts}, lidar_frame);
+ msg.header.stamp = ros::Time::now();
lidar_pub.publish(msg);
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3279915..f007cff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -155,8 +155,8 @@ endif(WIN32)
add_subdirectory( cmake )
add_subdirectory( src )
-add_subdirectory( examples )
-add_subdirectory( test )
diff --git a/CMake/vtkAndroid.cmake b/CMake/vtkAndroid.cmake
index 2ef512c5f7..3cdc39b376 100644
--- a/CMake/vtkAndroid.cmake
+++ b/CMake/vtkAndroid.cmake
@@ -142,7 +142,9 @@ macro(crosscompile target api abi out_build_dir)
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/${target}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_TOOLCHAIN_FILE:PATH=${_ANDROID_TOOLCHAIN}
+ -DANDROID_ABI:BOOL=arm64-v8a