Skip to content

Instantly share code, notes, and snippets.

View eborghi10's full-sized avatar
πŸ€–
Making robots! πŸ‡¦πŸ‡·

Emiliano Borghi eborghi10

πŸ€–
Making robots! πŸ‡¦πŸ‡·
View GitHub Profile
@eborghi10
eborghi10 / bitset_iter.h
Created December 19, 2024 21:57 — forked from diegum/bitset_iter.h
Missed an iterator for C++ STL bitset? Have mine!
// bitset_iter.h v1.1.0
// Copyright 2019, Diego Dagum
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
@eborghi10
eborghi10 / custom_iterator.cpp
Created October 22, 2024 01:53 — forked from jeetsukumaran/custom_iterator.cpp
Sample C++/STL custom iterator
// Sample custom iterator.
// By perfectly.insane (http://www.dreamincode.net/forums/index.php?showuser=76558)
// From: http://www.dreamincode.net/forums/index.php?showtopic=58468
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cassert>
@eborghi10
eborghi10 / points.cpp
Created September 9, 2021 17:53 — forked from cseas/points.cpp
Simple C++ OpenGL program to draw points on a 2D canvas
#include<GL/glut.h>
void display() {
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 0.0, 0.0);
glBegin(GL_POINTS);
glVertex2f(10.0, 10.0);
glVertex2f(150.0, 80.0);
glVertex2f(100.0, 20.0);
@eborghi10
eborghi10 / move_square.py
Created June 10, 2020 23:24 — forked from gurbain/move_square.py
This script allows to move and draw a square on the ground with the turtlebot in three different ways
import math
import rospy as ros
import sys
import time
from geometry_msgs.msg import Twist, Pose
from nav_msgs.msg import Odometry
from tf.transformations import euler_from_quaternion, quaternion_from_euler
@eborghi10
eborghi10 / conversion_node.cpp
Created August 20, 2019 02:37 — forked from marcoarruda/conversion_node.cpp
ROS Quaternion to RPY
#include <tf/tf.h>
#include <nav_msgs/Odometry.h>
#include <geometry_msgs/Pose2D.h>
ros::Publisher pub_pose_;
void odometryCallback_(const nav_msgs::Odometry::ConstPtr msg) {
geometry_msgs::Pose2D pose2d;
pose2d.x = msg->pose.pose.position.x;
pose2d.y = msg->pose.pose.position.y;