Skip to content

Instantly share code, notes, and snippets.

@droter
droter / install_cartographer_local.sh
Created November 8, 2022 19:03 — 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.
#! /usr/bin/python
import rospy
import actionlib
from nav_msgs.msg import Path, Odometry
from geometry_msgs.msg import PoseStamped, Pose
from tf.transformations import quaternion_from_euler
from math import pow, atan2, sqrt
from mbf_msgs.msg import (ExePathAction, ExePathFeedback, ExePathGoal, ExePathResult)
@droter
droter / relayCmd.srv
Last active May 6, 2020 14:33
Relay Service
int32 channel
bool state
---
bool success
#! /usr/bin/python
import rospy
from nav_msgs.msg import Path
from geometry_msgs.msg import PoseStamped
from tf.transformations import quaternion_from_euler
from std_msgs.msg import Float64
got_path = False
#!/usr/bin/env python
import rospy
import tf
import math
from nav_msgs.msg import Odometry
from tf.transformations import euler_from_quaternion, quaternion_from_euler, quaternion_multiply
from geometry_msgs.msg import Transform, Quaternion, QuaternionStamped, Pose, Point
from sensor_msgs.msg import NavSatFix, NavSatStatus, TimeReference
@droter
droter / steer motor test
Created August 18, 2019 22:20
Teensy software to test cytron motor controller and angle sensor from ROS cmd_vel
#include <WProgram.h>
#include "ros.h"
#include "ros/time.h"
#include <math.h>
#include "geometry_msgs/Twist.h"
//header file for publishing velocities for odom
// Steer angle sensor
int steer_angle_val;
#! /bin/bash
# test if OpenCV already installed for python
function test_opencv_installed()
{
RC=0
python3 -c "import cv2" > /dev/null 2>&1 || RC=$?
if [ $RC -eq 0 ] ;
then
@droter
droter / servo_fail_safe.ino
Last active January 24, 2019 16:57
Arduino Mini Pro Servo Fail-Safe
#include <Servo.h>
// Base Controller Input
#define cmdPin 2
// Servo Output
#define servoPin 5
// Transmission Neutral Safe Position
#define transCenter 1550
@droter
droter / Dockerfile
Created March 21, 2018 15:29 — forked from ruffsl/Dockerfile
Small ROS Network Example
FROM ros:indigo-ros-base
# install ros tutorials packages
RUN apt-get update && apt-get install -y \
ros-indigo-ros-tutorials \
ros-indigo-common-tutorials \
&& rm -rf /var/lib/apt/lists/