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
// 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> |
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<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); |
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 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 |
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 <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; |