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
from tf.transformations import quaternion_matrix #Return homogeneous rotation matrix from quaternion. | |
from tf.transformations import quaternion_from_matrix #Return quaternion from rotation matrix. | |
from tf.transformations import quaternion_multiply | |
""" | |
>>> dir( tf.transformations ) | |
['Arcball', '_AXES2TUPLE', '_EPS', '_NEXT_AXIS', '_TUPLE2AXES', '__builtins__', '__doc__', '__docformat__', '__file__', '__name__', '__package__', '_import_module', 'arcball_constrain_to_axis', 'arcball_map_to_sphere', 'arcball_nearest_axis', 'clip_matrix', 'compose_matrix', 'concatenate_matrices', 'decompose_matrix', 'division', 'euler_from_matrix', 'euler_from_quaternion', 'euler_matrix', 'identity_matrix', 'inverse_matrix', 'is_same_transform', 'math', 'numpy', 'orthogonalization_matrix', 'projection_from_matrix', 'projection_matrix', 'quaternion_about_axis', 'quaternion_conjugate', 'quaternion_from_euler', 'quaternion_from_matrix', 'quaternion_inverse', 'quaternion_matrix', 'quaternion_multiply', 'quaternion_slerp', 'random_qu |
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 | |
"""Convert all raw images to compressed images. All other topics are copied from input bag | |
to output bag | |
USAGE::: | |
python image_raw_to_compressed.py _bag:=/home/ttekep/data/gtsam/random2.bag | |
""" | |
| |
import rospy |
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
cmake_minimum_required(VERSION 2.8.3) | |
project(roveo_sensor_calibration) | |
add_compile_options(-std=c++11) | |
find_package(catkin REQUIRED COMPONENTS | |
roscpp | |
rospy | |
std_msgs | |
) |
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
// | |
// OpenCV provides an easy class interface for read and write cv::Mat | |
// can also use these with Eigen by converting eigen mat to cv::Mat using | |
// cv::cv2eigen() and cv::eigen2cv() | |
// Writing to file | |
cv::FileStorage storage("test.yml", cv::FileStorage::WRITE); | |
storage << "img" << img; | |
storage.release(); |
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 numpy as np | |
def convert_3x3_1x1__to__4x4(fname, outfname, outvarname ): | |
## READ YAML OPENCV | |
print( 'fname: ', fname ) | |
fs = cv2.FileStorage(fname, cv2.FILE_STORAGE_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
#pragma once | |
#include <iostream> | |
#include <string> | |
class ImageNetLabels { | |
public: | |
ImageNetLabels() | |
{ |
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
/** | |
* Copyright (c) 2015-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD+Patents license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
#include <cstdio> | |
#include <cstdlib> |
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 serial | |
import pynmea2 | |
import collections | |
def signal_handle( sig, frame ): | |
# Save JSON | |
import json | |
with open( '/home/mpkuse/try/gps_nmea/data.json', 'w' ) as outfile: | |
json.dump( ARY, outfile ) | |
exit(0) |
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 rosbag | |
from cv_bridge import CvBridge, CvBridgeError | |
import cv2 | |
# Input : A ros-bag | |
# Output : Save the image msg as individual images. Edit as appropriate. | |
bag = rosbag.Bag('banana.bag') | |
for topic, msg, t in bag.read_messages(topics=['/mynteye/right/image_raw']): | |
# print msg |
NewerOlder