Skip to content

Instantly share code, notes, and snippets.

View allenh1's full-sized avatar

Hunter L. Allen allenh1

  • Apex.AI
  • Media, PA
View GitHub Profile
@allenh1
allenh1 / deboostify_tuples.sh
Last active October 16, 2018 18:51
Remove boost::tuple
#!/bin/bash
file_list=$(find src -name \*.h -print -o -name \*.cpp -print)
echo "boost::tuple -> std::tuple..."
for i in ${file_list}; do
sed -b -i -E -r -e 's/boost\/tuple\/tuple.hpp/tuple/g' $i
sed -b -i -E -r -e '/boost\/tuple\/tuple_comparison.hpp/d' $i
sed -b -i -E -r -e 's/boost::tuple/std::tuple/g' $i
@allenh1
allenh1 / deboostify_boost_bind_function.sh
Last active November 7, 2018 16:07
deboostify_bind_function.sh
#!/bin/bash
file_list=$(find src -name \*.h -print -o -name \*.cpp -print -o -name \*.inl -print)
((len=0))
for i in ${file_list}; do
((len=$len + 1))
done
echo "boost::bind -> std::bind..."
@allenh1
allenh1 / gazebo-9.4.1-ogre-1-10-support.patch
Created December 12, 2018 15:50
Adds support for Gazebo 9.4.1 with Ogre >= 1.10
From 41c9d23389d5a6bc8ef51b2f2f44ff78f34df80f Mon Sep 17 00:00:00 2001
From: "Hunter L. Allen" <hallen@kns.com>
Date: Tue, 11 Dec 2018 19:02:12 -0500
Subject: [PATCH 5/5] Add OGRE >= 1.10 support for Ogre::SharedPtr (which is
now just a std::shared_ptr)
---
gazebo/gui/model/EditorMaterialSwitcher.cc | 18 +++++--
gazebo/rendering/Camera.cc | 16 ++++++
gazebo/rendering/DepthCamera.cc | 22 ++++++++-
@allenh1
allenh1 / .emacs
Last active February 4, 2019 00:03
;;; Package --- emacs setup
;;
;;; Commentary:
;; not much goin on here, I think.
;;
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
;;; Code:
// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em
// with input from rosidl_generator_cpp:msg\PrimitivesStatic.idl
// generated code does not contain a copyright notice
#ifndef ROSIDL_GENERATOR_CPP__MSG__PRIMITIVES_STATIC__STRUCT_HPP_
#define ROSIDL_GENERATOR_CPP__MSG__PRIMITIVES_STATIC__STRUCT_HPP_
#include <rosidl_generator_cpp/bounded_vector.hpp>
#include <rosidl_generator_cpp/message_initialization.hpp>
#include <algorithm>
// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em
// with input from rosidl_generator_cpp:msg/Various.idl
// generated code does not contain a copyright notice
#ifndef ROSIDL_GENERATOR_CPP__MSG__VARIOUS__STRUCT_HPP_
#define ROSIDL_GENERATOR_CPP__MSG__VARIOUS__STRUCT_HPP_
#include <rosidl_generator_cpp/bounded_vector.hpp>
#include <rosidl_generator_cpp/message_initialization.hpp>
#include <algorithm>
-- Found ament_cmake_ros: 0.7.0 (G:/ros2_ws/install/share/ament_cmake_ros/cmake)
-- Found PythonInterp: C:/Python37/python.exe (found suitable version "3.7.3", minimum required is "3")
-- Using PYTHON_EXECUTABLE: C:/Python37/python.exe
-- Found builtin_interfaces: 0.7.4 (G:/ros2_ws/install/share/builtin_interfaces/cmake)
-- Found rosidl_adapter: 0.7.3 (G:/ros2_ws/install/share/rosidl_adapter/cmake)
-- Found rcl: 0.7.4 (G:/ros2_ws/install/share/rcl/cmake)
-- Found rmw_implementation_cmake: 0.7.1 (G:/ros2_ws/install/share/rmw_implementation_cmake/cmake)
-- Found rcl_yaml_param_parser: 0.7.4 (G:/ros2_ws/install/share/rcl_yaml_param_parser/cmake)
-- Found rosgraph_msgs: 0.7.4 (G:/ros2_ws/install/share/rosgraph_msgs/cmake)
-- Found ament_cmake_gtest: 0.7.3 (G:/ros2_ws/install/share/ament_cmake_gtest/cmake)
@allenh1
allenh1 / cyclonedds.repos
Created October 17, 2020 13:33
CycloneDDS Source Repos
repositories:
eclipse-cyclonedds/cyclonedds:
type: git
url: https://github.com/eclipse-cyclonedds/cyclonedds
version: master
ros2/rcutils:
type: git
url: https://github.com/ros2/rcutils/
version: eloquent
ros2/rmw:
@allenh1
allenh1 / become_router.bash
Created December 26, 2020 03:41
Make yourself a router
#!/bin/bash
device_name="enp5s0"
source_device="wlp3s0"
sudo ip link set ${device_name} down
sudo ip addr flush dev ${device_name}
sudo ip addr show dev ${device_name}
sudo ip addr add 10.5.5.1/24 dev ${device_name}
@allenh1
allenh1 / cloning_xavier.md
Last active October 15, 2021 13:41
Cloning a Jetson Xavier Platform

Copy rootfs from existing device

To copy the root fs, ssh into the machine and log in as root (sudo -i). Next, make the file system read only.

# echo u > /proc/sysrq-trigger

To verify, this took, you can run touch file, and you should get the following.