This file contains hidden or 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 cv2 | |
| import subprocess | |
| ### for reference, the output of v4l2-ctl -d /dev/video1 -l (helpful for min/max/defaults) | |
| # brightness (int) : min=0 max=255 step=1 default=128 value=128 | |
| # contrast (int) : min=0 max=255 step=1 default=128 value=128 | |
| # saturation (int) : min=0 max=255 step=1 default=128 value=128 | |
| # white_balance_temperature_auto (bool) : default=1 value=1 | |
| # gain (int) : min=0 max=255 step=1 default=0 value=0 | |
| # power_line_frequency (menu) : min=0 max=2 default=2 value=2 | 
  
    
      This file contains hidden or 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; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Copyright 2016 Massachusetts Institute of Technology | |
| """Publish a video as ROS messages. | |
| """ | |
| import argparse | 
  
    
      This file contains hidden or 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 dlib | |
| import cv2 | |
| detector = dlib.simple_object_detector("detector.svm") | |
| cap = cv2.VideoCapture(0) | |
| while(True): | |
| # Capture frame-by-frame | |
| ret, frame = cap.read() | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #!/usr/bin/env python | |
| import rospy | |
| from geometry_msgs.msg import Twist | |
| def callback(message): | |
| rospy.loginfo("message: (%2.2f %2.2f)", message.linear.x, message.angular.z) | |
| def listener(): | |
| rospy.init_node('twist_example') | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #!/usr/bin/env python | |
| import math | |
| from math import sin, cos, pi | |
| import rospy | |
| import tf | |
| from nav_msgs.msg import Odometry | |
| from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3 | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #!/usr/bin/env python | |
| import rospy | |
| from sensor_msgs.msg import LaserScan | |
| rospy.init_node('laser_scan_publisher') | |
| scan_pub = rospy.Publisher('scan', LaserScan, queue_size=50) | |
| num_readings = 100 |