Skip to content

Instantly share code, notes, and snippets.

View rfzeg's full-sized avatar

Roberto Zegers R. rfzeg

  • The Construct
  • Aachen, Germany
View GitHub Profile
@garaemon
garaemon / topics_to_ssv.py
Created February 17, 2011 12:24
a script to output the values of ros topics into a text file
#!/usr/bin/env python
import roslib
roslib.load_manifest("sensor_msgs")
roslib.load_manifest("message_filters")
roslib.load_manifest("rxtools")
import rospy
import rxtools
import rxtools.rosplot
import sys
@jwebcat
jwebcat / gist:5122366
Last active July 24, 2024 12:11 — forked from lemenkov/gist:1674929
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@silgon
silgon / distance_angle_pose_to_point.cpp
Last active March 21, 2024 02:59
Get distance and angle of the closest obstacle from pose and map
#include <ros/ros.h>
#include <nav_msgs/OccupancyGrid.h>
#include <geometry_msgs/PoseStamped.h>
#include <tf/tf.h>
#include <tf/transform_listener.h>
#include <iterator>
#include <vector>
// some definitions of functions
#define MAP_INDEX(map, i, j) ((i) + (j) * map.size_x)
@robodhruv
robodhruv / odom_to_path.py
Last active May 29, 2023 09:10
ROS Node for converting nav_msgs/odometry messages to nav_msgs/Path
#!/usr/bin/env python
from __future__ import print_function
import rospy
from tf.transformations import quaternion_from_euler
from std_msgs.msg import String
from nav_msgs.msg import Odometry, Path
from geometry_msgs.msg import PoseWithCovarianceStamped, PoseStamped
from sensor_msgs.msg import Joy
import sys
import json
@miyataken999
miyataken999 / script.js
Created August 26, 2018 09:25
THREEJS: Update texture on click
var scene = new THREE.Scene();
scene.background = new THREE.Color( 0xcccccc );
var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.z = 5;
camera.position.y = 5;
camera.position.x = 5;
camera.lookAt(new THREE.Vector3(0,0,0)); // Make the camera look at the point of origin
import xml.etree.ElementTree as ET
import json
import zlib
import base64
import urllib.parse
import os
import uuid
@Sarath18
Sarath18 / PathPublisher.py
Last active November 4, 2023 22:48
Script to publish ROS2 data
#!/usr/bin/python3
import rclpy
from rclpy.node import Node
from geometry_msgs.msg import PoseStamped
from nav_msgs.msg import Path
from math import sin, cos, pi
from squaternion import Quaternion
class PathPublisher(Node):