Skip to content

Instantly share code, notes, and snippets.

View rwbot's full-sized avatar
🤖
robotting

Chris Rowe rwbot

🤖
robotting
View GitHub Profile
@rwbot
rwbot / install_ros.sh
Created April 8, 2024 04:59
dotfiles
#! /bin/bash
#------------------------------------------------------------------
#------------------------------------------------------------------
# file: bl_install_ros.sh
# date: 01/24/2019
# author: Mark Cass
# description: Instal robot operating system and additional
# resources required for development.
#
@rwbot
rwbot / ros3dp diff manager
Last active April 3, 2024 21:00
ros3dp diff manager
#!/usr/bin/python3
from matplotlib.font_manager import json_dump
import pyudev
from pyudev import Context, Device, Monitor, MonitorObserver
import os
import roslaunch
import rospy
import sys
import subprocess
#!/bin/bash
# Get Machine Serial ID and set as env variable
MACHINE_SERIAL=$(sudo lshw |grep -m1 "serial:")
# Extracting value to the right of the colon
NODE_SERIAL=$(echo "$MACHINE_SERIAL" | awk -F': ' '{print $2}')
echo -e "\n" >> ~/.bashrc
echo -e "export NODE_SERIAL=$NODE_SERIAL" >> ~/.bashrc
# Print the extracted value
@rwbot
rwbot / states
Last active March 19, 2024 22:13
states[object Object]
to get printfile
waiting for job + printfile null
send printprogress
// printing status
"printStatus": {
"enum": [
"waitingForJob", // default state
@rwbot
rwbot / 3dp udev
Last active April 1, 2024 18:54
Marlin
ID_MODEL=MARLIN_STM32F407VGT6_CCM_CDC_in_FS_Mode
ttyACM0: /usr/lib/udev/rules.d/60-serial.rules:23 LINK 'serial/by-id/usb-STMicroelectronics_MARLIN_STM32F407VGT6_CCM_CDC_in_FS_Mode_207733A94B30-if00'
KERNEL=="ttyACM*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE:="0666"
SUBSYSTEMS=="tty", ATTRS{idVendor}=="0483", MODE:="0666"
# All USB
SUBSYSTEM=="usb", KERNEL=="ttyACM[0-9]*", MODE="0666"
@rwbot
rwbot / threads.json
Last active December 5, 2023 02:50
threads
{
"1": [0.2, 0.25],
"2": [0.25, 0.4],
"3": [0.35, 0.5],
"4": [0.5, 0.7, 1.0, 1.5, 2],
"5": [0.5, 0.8, 1.0, 1.5, 2],
"6": [0.75, 1.0, 1.5, 2],
"7": [0.75, 1.0, 1.5, 2],
"8": [0.75, 1.0, 1.25, 1.5, 2],
"9": [0.75, 1.0, 1.25, 1.5, 2],
@rwbot
rwbot / Recursive "Save for Later".md
Last active October 17, 2023 03:16
Move all Amazon cart items to "Save for Later"

Open Chrome Developer Console, WIN Ctrl+Shift+J or MAC Cmd+Opt+J, paste and enter

function saveAllAmazonCartItemsForLater() {
  var query = document.querySelectorAll("#activeCartViewForm input[value='Save for later']")
  console.log('started');

  if (query.length) {
    console.log('query.length = ' + query.length);
 query[0].click();

PCL_UNDERLAY

Debug

cd ~/dbg_source_pcl_ws
catkin config --extend /opt/ros/$ROS_DISTRO --install --cmake-args -DCMAKE_BUILD_TYPE=Debug
catkin build 
#include <ros/ros.h>
#include <std_msgs/String.h>
#include <geometry_msgs/Twist.h>
#include <sensor_msgs/LaserScan.h>
#include <math.h>
geometry_msgs::Twist twist;
geometry_msgs::Twist desired;
bool newMsg, newDesired;
#define PI 3.14159265
@rwbot
rwbot / gist:a18f0c28cdc986b0935a20e9796dbfef
Created June 30, 2020 00:59
demo_grid_driving_action ENUMs
tara -> demo_grid_driving_action
# Define the goal
int32 grid_drive_enum
int32 GRID_DRIVE_ENUM_ERROR = 0
int32 GRID_DRIVE_ENUM_DRIVE_TO_HOME_FROM_UNKNOWN_POS_PAST_HOMING_SENSOR = 1
int32 GRID_DRIVE_ENUM_DRIVE_TO_HOME_FROM_UNKNOWN_POS_BEFORE_HOMING_SENSOR = 2
int32 GRID_DRIVE_ENUM_DRIVE_TO_HOME_FROM_KNOWN_POS = 3
int32 GRID_DRIVE_ENUM_DRIVE_TO_GOAL_TOTE = 4