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
SE3 frame_to_kf_init = se3FromSim3(curr_tracking_ref_->keyframe->pose->getCamToWorld().inverse() * | |
sim3FromSE3(pose, 1.0)); | |
frame_to_kf_init.translation() *= curr_tracking_ref_->keyframe->pose->getCamToWorld().scale(); | |
SE3 frame_to_kf_upd = tracker_->trackFrame(curr_tracking_ref_.get(), | |
trackingNewFrame.get(), | |
frame_to_kf_init); |
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
;; Flycheck. | |
(use-package flycheck | |
:ensure t | |
:config (progn (add-hook 'after-init-hook #'global-flycheck-mode) | |
(add-hook 'python-mode-hook (lambda () | |
(flycheck-select-checker 'python-pylint))) | |
(setq-default flycheck-disabled-checkers '(c/c++-clang c/c++-gcc)))) | |
;; Flycheck Google cpplint | |
(use-package flycheck-google-cpplint |
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
// Project corners of image b into rectified camera. | |
std::vector<cv::Point2f> corners(4); | |
corners[0] = cv::Point2f(0.0f, 0.0f); | |
corners[1] = cv::Point2f(img_b.cols, 0.0f); | |
corners[2] = cv::Point2f(img_b.cols, img_b.rows); | |
corners[3] = cv::Point2f(0.0f, img_b.rows); | |
std::vector<cv::Point2f> new_corners(4); | |
Eigen::Quaternionf q_b_to_a(q_a.inverse() * q_b); | |
Eigen::Matrix3f P(K_b * q_b_to_a.toRotationMatrix() * K_b.inverse()); |
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
// In header: | |
#include <tf2_ros/transform_listener.h> | |
std::shared_ptr<tf2_ros::TransformListener> tf_listener_; | |
tf2_ros::Buffer tf_buffer_; | |
// In constructor: | |
tf_listener_ = | |
std::make_shared<tf2_ros::TransformListener>(tf_buffer_); | |
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
/** | |
* \brief Class to represent a feature track. | |
*/ | |
class FeatureTrack final { | |
public: | |
explicit FeatureTrack(const uint32_t id = 0, const uint32_t img_idx = 0, | |
const cv::Point2f& feat = cv::Point2f()) : | |
id(id), | |
pos(1, feat), | |
img(1, img_idx) {} |
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
// Homework 2 | |
// Image Blurring | |
// | |
// In this homework we are blurring an image. To do this, imagine that we have | |
// a square array of weight values. For each pixel in the image, imagine that we | |
// overlay this square array of weights on top of the image such that the center | |
// of the weight array is aligned with the current pixel. To compute a blurred | |
// pixel value, we multiply each pair of numbers that line up. In other words, we | |
// multiply each weight with the pixel underneath it. Finally, we add up all of the | |
// multiplied numbers and assign that value to our output for the current pixel. |
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 <unistd.h> | |
#include <boost/filesystem.hpp> | |
namespace fs = boost::filesystem; | |
// Get directory of executable (<base_dir>). | |
char exe_str[200]; | |
readlink("/proc/self/exe", exe_str, 200); | |
fs::path exe_path(exe_str); | |
std::string base_dir = exe_path.parent_path().string(); |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright 2015 Massachusetts Institute of Technology | |
"""Example plots using Matplotlib. | |
""" | |
import os |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright 2016 Massachusetts Institute of Technology | |
"""Extract images from a rosbag. | |
""" | |
import os | |
import argparse |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright 2016 Massachusetts Institute of Technology | |
"""Publish a video as ROS messages. | |
""" | |
import argparse |
OlderNewer