Skip to content

Instantly share code, notes, and snippets.

View anug7's full-sized avatar

Gunasekaran Srinivasan anug7

  • Bangalore, India
View GitHub Profile
@anug7
anug7 / wait_for_message.py
Last active April 26, 2024 13:30
Implementation of wait_for_message in ROS2
from typing import Any, Tuple
import rclpy
from rclpy.impl.implementation_singleton import rclpy_implementation as _rclpy
from rclpy.node import Node
from rclpy.signals import SignalHandlerGuardCondition
from rclpy.utilities import timeout_sec_to_nsec
def wait_for_message(msg_type: Any, node: Node, topic: str,
@anug7
anug7 / download_m3u8.py
Created January 29, 2024 07:11
Python HLS/TS streaming (m3u8) - Downloader
"""
Download script to download the m3u8 video stream files
"""
import multiprocessing as mp
from multiprocessing.pool import ThreadPool
import os
import subprocess
import sys
@anug7
anug7 / atan.c
Last active February 25, 2021 05:59
Arm64 SIMD atan2
#include <arm_neon.h>
const double __atanf_lut[4] = {
-0.0443265554792128, //p7
-0.3258083974640975, //p3
+0.1555786518463281, //p5
+0.9997878412794807 //p1
};
const double __atanf_pi_2 = M_PI_2
"""
OpenCV Mat viewer in GDB
"""
import gdb
import cv2
import numpy as np
class PlotterCommand(gdb.Command):
@anug7
anug7 / Dockerfile
Last active May 15, 2020 08:08
ROS-melodic-ubuntu1604-Dockerfile
FROM ubuntu:16.04
#Inspired from https://github.com/erlerobot/gym-gazebo/blob/master/Dockerfile
RUN apt install -y -q --no-install-recommends software-properties-common
RUN add-apt-repository -y ppa:deadsnakes/ppa
RUN apt update
RUN apt install -y -q --no-install-recommends curl python3.6-dev wget
RUN curl -s https://bootstrap.pypa.io/get-pip.py | python3.6 -
@anug7
anug7 / raw_record.cpp
Created September 3, 2019 03:29
Realsense ROS Node to record bag file as per realsense viewer format.
#include "ros/ros.h"
#include <sensor_msgs/image_encodings.h>
#include <sensor_msgs/Image.h>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/recursive_mutex.hpp>