Skip to content

Instantly share code, notes, and snippets.

View neomanic's full-sized avatar

Josh Marshall neomanic

  • Ampcontrol
  • Newcastle, Australia
View GitHub Profile
@neomanic
neomanic / Prometheus Water Meter.md
Created December 2, 2019 23:45 — forked from Tugzrida/Prometheus Water Meter.md
Prometheus Smart Water Meter project in MicroPython for the ESP32

Prometheus Water Meter

This is a fairly involved process as it seems that no one currently makes a pre-made product that measures water usage from a household meter.

It took quite a while to set up due to WiFi issues and the flow rate code still needs some work as the output is semi-random at the moment.

If you get stuck anywhere I'm happy to answer questions provided this doesn't go viral 😂

Components:

@neomanic
neomanic / ros_depth_cloud_filtering_example.cpp
Created July 31, 2019 23:04
A demo of how to use the PCL filtering functions in a real-life ROS example.
/*
This is an example of how to use the PCL filtering functions in a real robot situation.
This node will take an input depth cloud, and
- run it through a voxel filter to cut the number of points down (in my case, from ~130,000 down to 20,000)
- with a threshold to remove noise (requires minimum 5 input points per voxel)
- then transform it into the robot footprint frame, i.e. aligned with the floor
- subtract the robot footprint (our depth sensor's FOV includes the robot footprint, which changes dynamically with the load)
- subtract points in the ground plane, with different tolerances for near or far
- ground plane by default z = 0, but
@neomanic
neomanic / yaml_config_demo.py
Created February 12, 2019 00:12
Demo of how to save/load some basic config using yaml
import yaml
# store all your config in a dictionary
a = dict(setting_int=5, setting_string="string", setting_float=3.141)
# change a value
a["setting_int"] =-10
# save to file
f = open("config.yaml", 'w')
f.write(yaml.dump(a))
@neomanic
neomanic / macos_ros_install_notes.md
Created December 7, 2017 23:55
Notes from installing ROS on MacOS

I am currently developing a robot based on an UP Board with Xenial and ROS Kinetic, but wanted also to have ROS running on my mac notebook natively for development. The easiest option is a VM, but this is too painful with only 8GB RAM.

I used Mike Purvis's macOS install script, with the assistance of plusk01's notes (which had a completely different lot of build issues, but still useful).

The issues I had are all listed below. Given I had the script fail a few times, I quickly added the ROS environment variables and ran the commands manually.