This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# https://www.desmos.com/calculator/acagoky1yo | |
Point2 = np.ndarray # np.ndarray[2,] | |
def dist(p1: Point2, p2: Point2): | |
return np.linalg.norm(p2 - p1) | |
class LineSegment: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/zsh | |
source /opt/ros/noetic/setup.zsh | |
export ROS_MASTER_URI="http://$(echo $SSH_CLIENT | cut -d ' ' -f 1):11311" | |
export ROS_HOSTNAME="$(hostname -I | cut -d ' ' -f 1)" | |
$@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ros/ros.h> | |
#include <image_transport/image_transport.h> | |
int main(int argc, char *argv[]) { | |
ros::init(argc, argv, "auto_brightness", ros::init_options::AnonymousName); | |
ros::NodeHandle nh, pnh("~"); | |
image_transport::ImageTransport it{nh}; // Is this necessary? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
sed 's:#Server:Server:' /etc/pacman.d/mirrorlist.pacnew | grep -Ev "^#|^$" | rankmirrors - -n 10 | sudo tee /etc/pacman.d/mirrorlist && sudo rm /etc/pacman.d/mirrorlist.pacnew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/sh | |
rosdep install -yr --ignore-src --from-paths ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ROS_HOSTNAME=$(hostname -I | awk '{print $1}' | head -c -1 -) | |
source ./devel/setup.zsh | |
export CATKIN_PROFILE="$(catkin profile list | awk '/\(active\)/{print $2}')" | |
echo -ne "[\n]" > $ROS_WS_DIR/.catkin_tools/CATKIN_BUILD_DUMMY.json | |
catkin_build() { | |
catkin build $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/zsh | |
socat PTY,link=$HOME/myserialline,raw,echo=0 EXEC:'ssh suraj@rathi socat - /dev/ttyACM0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
import time | |
from math import pi | |
from typing import List, Optional, Tuple | |
import serial | |
# Received garbage | |
class InvalidResponse(Exception): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import select | |
import sys | |
import time | |
if os.name == 'nt': | |
import msvcrt | |
else: | |
import tty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
from typing import Optional | |
import numpy as np | |
import rospy | |
from map_msgs.msg import OccupancyGridUpdate | |
from nav_msgs.msg import OccupancyGrid | |
from rospy.numpy_msg import numpy_msg | |
OlderNewer