Skip to content

Instantly share code, notes, and snippets.

View dbaldwin's full-sized avatar

Dennis Baldwin dbaldwin

View GitHub Profile
# From this article
https://ardupilot.org/dev/docs/ros-vio-tracking-camera.html
# This works well on Pi4 (don't forget to change the script to include the python bindings)
# If you receive an error about CXX not found make sure to follow the article above and set the env variables
# export CC=/usr/bin/gcc-7
# export CC=/usr/bin/g++-7
https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md
# Install ROS Wrapper
<!DOCTYPE html>
<html>
<head>
<title>Disconnected</title>
<meta charset="utf-8" />
<script type="text/javascript" src="http://static.robotwebtools.org/EventEmitter2/current/eventemitter2.min.js"></script>
<script type="text/javascript" src="http://static.robotwebtools.org/roslibjs/current/roslib.min.js"></script>
</head>
<body>
Problem with catking_make. Error with cv_bridge and opencv3 missing. Followed this suggestion:
https://github.com/ros-perception/vision_opencv/issues/320#issuecomment-618369623
Then build broke at 75% with this error:
/home/db/catkin_ws/src/vision_to_mavros/src/t265_fisheye_undistort.cpp:61:17: error: ‘CV_CALIB_ZERO_DISPARITY’ was not declared in this scope
Based on the line here:
https://risc.readthedocs.io/2-auto-service-start-afer-boot.html
Helpful links
https://ubuntu.com/download/raspberry-pi
http://wiki.ros.org/melodic/Installation/Ubuntu
1. Download image and burn to SD card with Etcher
2. The first challenge on boot of Pi is setting up the wireless network. This will require a keyboard and ethernet connection to Pi. I've documented a bit in this gist:
https://gist.github.com/dbaldwin/fa1baac11b0ae2f000092b695c3d0b33
3. After getting the network setup you'll want to SSH into the Pi. At least that's what I did.
@dbaldwin
dbaldwin / gist:fa1baac11b0ae2f000092b695c3d0b33
Created April 6, 2020 17:40
Ubuntu Server 18.04.04 LTS Raspberry Pi 4 Wireless Config with Netplan
From this article:
https://unix.stackexchange.com/questions/550296/how-to-set-up-wifi-on-ubuntu-19-10-server-running-on-raspberry-pi-4
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
@dbaldwin
dbaldwin / gist:351cd33710e212cbe274757b411f9f76
Last active June 19, 2023 18:01
MAVROS Experimentation w/ Pi and Nano
# PX4 launch command
roslaunch mavros px4.launch
# PX4 launch file (default fcu_url worked fine for Pi 4 running Ubuntu server)
https://github.com/mavlink/mavros/blob/master/mavros/launch/px4.launch
If using the mini USB connector on Pi 4 you can use the default fcu_url
<arg name="fcu_url" default="/dev/ttyACM0:57600" />
If using the telemetry 2 port on Pixhawk you need this.
@dbaldwin
dbaldwin / gist:fdae2fe9b83e03fcfa854815b0699dcb
Last active June 10, 2022 17:18
Tiling an FAA sectional chart with GDAL and viewing it as a layer in Google Earth
# Dennis Baldwin
# March 29, 2019
# I've found the easiest and most consistent way to pull this off is with Docker and the following image
# https://github.com/geo-data/gdal-docker
# Change to your working directory and run the following Docker command
# The command below will map your current directory to a /data directory in the container
docker run -it -v $(pwd):/data geodata/gdal /bin/bash
@dbaldwin
dbaldwin / gist:d53e92f2bfe4f42e7a55d3e99ad9df71
Created January 25, 2019 23:43
Node-RED Flow for Sending Commands to Tello and Receiving Responses
[{"id":"2e9fa6db.59b79a","type":"tab","label":"Send Command and Wait for Response to Proceed","disabled":false,"info":""},{"id":"ceb0910c.e28dd","type":"debug","z":"2e9fa6db.59b79a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":770,"y":80,"wires":[]},{"id":"cc7f1214.9bc0a","type":"inject","z":"2e9fa6db.59b79a","name":"","topic":"","payload":"command takeoff land","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":"","x":140,"y":180,"wires":[["fdc7329e.d0c75"]]},{"id":"f362f3e3.67806","type":"function","z":"2e9fa6db.59b79a","name":"Simple triggered queue","func":"// if queue doesn't exist, create it\ncontext.queue = context.queue || [];\ncontext.busy = context.busy || false;\n\n// if the msg is a trigger one release next message\nif (msg.hasOwnProperty(\"trigger\")) {\n if (context.queue.length > 0) {\n var m = context.queue.shift();\n return {payload:m};\n }\n else {\n context.busy = false;\n }\n}\nelse {\
function allStorageGet(callback, key) {
var storage = (browser.storage || {}).sync;
var fn = (typeof callback === 'function') ? callback : (function () {});
// Test whether a string is enclosed by `{}`.
function isObjectStr(str) {
return /^{[\s\S]*}$/.test(str);
}
function parseLocalStorage() {