Skip to content

Instantly share code, notes, and snippets.

View ojura's full-sized avatar
:octocat:
⏯⏺⏮⏭

Juraj Oršulić ojura

:octocat:
⏯⏺⏮⏭
View GitHub Profile
#!/usr/bin/python
import rospy
import rosbag
import os
import sys
import argparse
def remove_tf(inbag,outbag,frame_ids):
rospy.loginfo(' Processing input bagfile: %s', inbag)
rospy.loginfo(' Writing to output bagfile: %s', outbag)
#!/bin/bash
# scp-speed-test.sh
# Author: Alec Jacobson alecjacobsonATgmailDOTcom
#
# Test ssh connection speed by uploading and then downloading a 10000kB test
# file (optionally user-specified size)
#
# Usage:
# ./scp-speed-test.sh user@hostname [test file size in kBs]
#
-- Copyright 2016 The Cartographer Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
#!/bin/bash
SOURCE_REPOS="cartographer cartographer_ros root:"
TARGET_REPO="cartographer_combined"
function update_repo() {
SOURCE=$(echo $1 | sed -E 's/:.*//')
cd $SOURCE
FIRST_RUN=$2
diff -r ./perl5/lib/perl5/Git/FastExport/Stitch.pm Git-FastExport/lib/Git/FastExport/Stitch.pm
191,196c190,192
< my $github_name;
< $github_name = "googlecartographer/"; $github_name .= $repo->{name};
<
< $commit->{data} =
< "[$repo->{name}] " . $commit->{data} . "\nOriginal commit:\n" .
< $github_name. "@" .$repo->{mark_hashes}{$commit->{original_mark}}."\n";
---
> $commit->{data} =
@ojura
ojura / install_cartographer_local.sh
Created January 31, 2018 15:38 — forked from kdaun/install_cartographer_local.sh
Cartographer install script depending on a local protobuf install
# Install wstool and rosdep.
sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build
# Create a new workspace in 'catkin_ws'.
mkdir cartographer_ws
cd cartographer_ws
wstool init src
# Merge the cartographer_ros.rosinstall file and fetch code for dependencies.
sensor_msgs::PointCloud2 prepareTimedPointCloud2Message(const ros::Time timestamp, const std::string &frameId,
const int numPoints) {
sensor_msgs::PointCloud2 msg;
msg.header.stamp = timestamp;
msg.header.frame_id = frameId;
msg.height = 1;
msg.width = numPoints;
msg.fields.resize(4);
msg.fields[0].name = "x";
msg.fields[0].offset = 0;
@ojura
ojura / landmark_direct_cost_function.h
Last active July 16, 2018 10:25
DirectLandmarkCostFunction3DWithTwoObservations
// Cost function measuring the weighted error between the observed pose given by
// the landmark measurement and the linearly interpolated pose.
class DirectLandmarkCostFunction3DWithTwoObservations {
public:
using LandmarkObservation =
PoseGraphInterface::LandmarkNode::LandmarkObservation;
static ceres::CostFunction* CreateAutoDiffCostFunction(
const LandmarkObservation& observation1, const NodeSpec3D& prev_node1,
const NodeSpec3D& next_node1, const LandmarkObservation& observation2,
#include "cartographer/io/proto_stream.h"
#include "cartographer/io/proto_stream_deserializer.h"
#include "cartographer/mapping/pose_graph.h"
#include "cartographer_ros/msg_conversion.h"
#include "cartographer_ros/time_conversion.h"
#include "cartographer_ros/split_string.h"
#include "geometry_msgs/TransformStamped.h"
namespace cartographer_ros {
@ojura
ojura / gist:8b8a5102e7c07e4eb4d0ebc93c1d80ac
Created October 26, 2018 09:49
ros-kinetic-abseil-cpp build errors
In file included from /ws2/build/cartographer_ros/abseil/src/abseil/absl/types/variant.h:77:0,
from /ws2/build/cartographer_ros/abseil/src/abseil/absl/hash/internal/hash.h:48,
from /ws2/build/cartographer_ros/abseil/src/abseil/absl/hash/hash.h:64,
from /ws2/build/cartographer_ros/abseil/src/abseil/absl/container/internal/hash_function_defaults.h:55,
from /ws2/build/cartographer_ros/abseil/src/abseil/absl/container/flat_hash_set.h:37,
from /ws2/devel/include/cartographer/io/points_batch.h:25,
from /ws2/devel/include/cartographer/io/image.h:27,
from /ws2/src/cartographer_ros/cartographer_ros/cartographer_ros/ros_map.h:24,
from /ws2/src/cartographer_ros/cartographer_ros/cartographer_ros/ros_map.cc:17:
/ws2/build/cartographer_ros/abseil/src/abseil/absl/types/internal/variant.h:1091:29: error: ‘absl::type_traits_internal::is_detected_convertible’ has not been declared