Skip to content

Instantly share code, notes, and snippets.

View nevalsar's full-sized avatar
🎯
Focusing

Nevin Valsaraj nevalsar

🎯
Focusing
View GitHub Profile
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"--shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",

ROS - Common Issues

Problem

roscd \ rosls \ rosrun commands not found

Solution:

Install rosbash package.

sudo apt install ros-noetic-rosbash

{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"extends": [
"standard",
"plugin:react/recommended"
],
#include <ros/ros.h>
#include <ros/console.h>
#include <std_msgs/String.h>
#include <cv_bridge/cv_bridge.h>
#include <image_transport/image_transport.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/opencv.hpp>
#include <topicheaders/topicheaders.h>
#define CAMERA_ID 0 // 0: front camera, 1: bottom camera
@nevalsar
nevalsar / mux-debug-auv-core.log
Created February 19, 2015 13:12
Output of `tmux debug auv-core`
#!/bin/zsh
# Clear rbenv variables before starting tmux
unset RBENV_VERSION
unset RBENV_DIR
tmux start-server\; has-session -t auv-core 2>/dev/null
if [ "$?" -eq 1 ]; then
cd /home/routeaccess
@nevalsar
nevalsar / github_contribution.py
Created February 17, 2015 16:17
Get contribution count of user on GitHub
#!/usr/bin/env python
# Python script to get the day's contribution count from user's GitHub account
# Use flag -h for parameter information
import urllib2
from bs4 import BeautifulSoup
import argparse
# parse args and set parameter details
parser = argparse.ArgumentParser(description='Get GitHub contribution data')
@nevalsar
nevalsar / _setup_util.py
Created February 14, 2015 21:01
ROS setup files for workspace environment overlay on zsh
#!/usr/bin/python
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@nevalsar
nevalsar / dbbook_slides_download.py
Last active August 29, 2015 14:15
Downloader script for companion slides from http://db-book.com/
#!/usr/bin/env python
# script to download all study material slides from http://db-book.com/
# =======================================================================
# Author : Nevin Valsaraj <nevin[dot]valsaraj32[at]gmail[dot]com>
# Distributed under the MIT License.
# (See full license at http://opensource.org/licenses/MIT)
# =======================================================================
@nevalsar
nevalsar / morse_installer.sh
Created November 5, 2014 12:54
Installer bash script for MORSE
#!/bin/bash
#=======================================================================
# Author : Nevin Valsaraj <nevin[dot]valsaraj32[at]gmail[dot]com>
# Distributed under the MIT License.
# (See full license at http://opensource.org/licenses/MIT)
#=======================================================================
#In short, I can't be held accountable if you wreck your computer.
echo -e "\nAlright, let's begin."
read -p "Is this the directory you cloned morse? [y/n]" -n 1 -r
@nevalsar
nevalsar / blobdetectrecursion.cpp
Last active December 30, 2015 00:29
Blob detection using recursion
#include <stdio.h>
#include "opencv2/opencv.hpp"
#define PIX(img,i,j,k) (((uchar*)img->imageData)[i*img->widthStep+j*img->nChannels+k])
void dfsrecursion(IplImage* img, int x, int y, int **status, int blobcount)
{
int i,j;
//traverse all connected pixels and start dfs if encounter a black unvisited pixel