Skip to content

Instantly share code, notes, and snippets.

@gerkey
gerkey / add-all-repos-to-team.py
Created June 10, 2020 19:12
Script used to add all org repos to a given team, with admin permission
#!/usr/bin/env python3
import requests
import sys
USAGE = 'add-all-org-repos-to-team.py <github-oauth-token>'
org = 'osrf'
team = 'ex-owners'
permission = "admin"
@gerkey
gerkey / unwatch-repos.py
Created June 10, 2020 04:42
Un-watch a list of repos based on the URLs given in the "Subscribed to..." email from GitHub
#!/usr/bin/env python3
# This script can be used to un-watch a bunch of repos in the situation in
# which you were automatically made to watch them. It relies on the email
# notification(s) that you received from GH about the newly watched repos.
#
# Usage:
#
# 1. Copy and paste all the URLs of the form
# https://github.com/ORG/REPO/subscription from the GH notification
@gerkey
gerkey / repo2pkg.py
Created April 30, 2020 22:51
Script to expand REP 2005 repo list to pkg list
#!/usr/bin/env python3
import re
import requests
import rosdistro
import sys
repofile = sys.argv[1]
ros2distros = ['foxy', 'eloquent']
@gerkey
gerkey / Build instructions
Last active September 5, 2019 09:16
Kobuki minimal build
# Install some dependencies
sudo apt-get install ros-kinetic-catkin ros-kinetic-cmake-modules libftdi-dev ros-kinetic-sophus
. /opt/ros/kinetic/setup.bash
# Make a workspace
mkdir ws
cd ws
mkdir src
cd src
git clone https://github.com/stonier/ecl_core.git
@gerkey
gerkey / CMakeLists.txt
Created June 10, 2016 22:41
OpenSplice example
cmake_minimum_required(VERSION 2.8.3)
set(CMAKE_BUILD_TYPE Debug)
#set(CMAKE_CXX_COMPILER clang-3.8)
find_package(OpenSplice REQUIRED)
#add_definitions(-fsanitize=memory -fno-omit-frame-pointer -stdlib=libc++)
include_directories(${OPENSPLICE_INCLUDE_DIRS})
add_executable(foo foo.cpp)
target_link_libraries(foo ${OPENSPLICE_LIBRARIES})
@gerkey
gerkey / guard.patch
Created June 8, 2016 20:28
Use a different guard condition for each waitset
diff --git a/rclcpp/include/rclcpp/utilities.hpp b/rclcpp/include/rclcpp/utilities.hpp
index ace7200..1484849 100644
--- a/rclcpp/include/rclcpp/utilities.hpp
+++ b/rclcpp/include/rclcpp/utilities.hpp
@@ -52,7 +52,7 @@ shutdown();
/// Get a handle to the rmw guard condition that manages the signal handler.
RCLCPP_PUBLIC
rcl_guard_condition_t *
-get_global_sigint_guard_condition();
+get_global_sigint_guard_condition(void*);
@gerkey
gerkey / pcap_reader.py
Created April 19, 2016 16:25
Script to read pcap files and play them back as UDP packets (meant for Velodyne testing)
#!/usr/bin/env python
# Read a .pcap file full of UDP packets from a velodyne and play them back to
# localhost:2368, for consumption by the velodyne driver.
#
# TODO: error-checking and options (looping, etc.)
import dpkt
import sys
import socket
@gerkey
gerkey / fun.repos
Last active April 13, 2016 07:30
Repos to pull when trying ROS 1 and 2 integration
repositories:
src/ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
src/ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
src/ament/ament_lint:
@gerkey
gerkey / CMakeLists.txt
Last active February 19, 2016 16:10
ROS 1 message reuse
cmake_minimum_required(VERSION 2.8.3)
find_package(sensor_msgs REQUIRED)
include_directories(${sensor_msgs_INCLUDE_DIRS})
link_directories(${sensor_msgs_LIBRARY_DIRS})
add_executable(foo foo.cpp)
target_link_libraries(foo ${sensor_msgs_LIBRARIES})