View bspline.py
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 numpy as np | |
import matplotlib.patches as patches | |
class BSpline(): | |
def __init__(self): | |
pass | |
self.warp = 4. | |
self.count = 26*2 |
View TEAPOT.py
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
from OpenGL.GLUT import * | |
from OpenGL.GLU import * | |
from OpenGL.GL import * | |
import sys | |
name = 'OpenGL Python Teapot' | |
def main(): | |
glutInit(sys.argv) | |
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH) |
View carla_car.py
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 | |
# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de | |
# Barcelona (UAB). | |
# | |
# This work is licensed under the terms of the MIT license. | |
# For a copy, see <https://opensource.org/licenses/MIT>. | |
# Allows controlling a vehicle with a keyboard. For a simpler and more | |
# documented example, please take a look at tutorial.py. |
View osx_patch.txt
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
diff --git a/cmake/Modules/FindvecLib.cmake b/cmake/Modules/FindvecLib.cmake | |
index 4d44e613..29ea43f7 100644 | |
--- a/cmake/Modules/FindvecLib.cmake | |
+++ b/cmake/Modules/FindvecLib.cmake | |
@@ -18,8 +18,11 @@ find_path(vecLib_INCLUDE_DIR vecLib.h | |
PATHS /System/Library/Frameworks/Accelerate.framework/Versions/Current/${__veclib_include_suffix} | |
/System/Library/${__veclib_include_suffix} | |
${CMAKE_XCODE_DEVELOPER_DIR}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/ | |
+ ${CMAKE_XCODE_DEVELOPER_DIR}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/ | |
NO_DEFAULT_PATH) |
View gist:26c4d6d36407e37c21cdf033c532a9ca
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
pcl::PointXYZ lineIntersect(const std::vector<float>& P, const std::vector<float>& Q){ | |
Eigen::Vector3f DP(P[3], P[4], P[5]); | |
Eigen::Vector3f DQ(Q[3], Q[4], Q[5]); | |
Eigen::Vector3f P0(P[0], P[1], P[2]); | |
Eigen::Vector3f Q0(Q[0], Q[1], Q[2]); | |
Eigen::Vector3f PQ = Q0 - P0; | |
float a = DP.dot(DP); | |
float b = DP.dot(DQ); | |
float c = DQ.dot(DQ); |
View deep_learning.py
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
# CODE BASED ON http://www.deepideas.net/about-me/ | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from queue import Queue | |
import time | |
# A dictionary that will map operations to gradient functions | |
_gradient_registry = {} |
View opt.cpp
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
static Eigen::Matrix4Xf findCameraIntersectionsOpt2(const Datum& cam_data, const std::vector<int>& good_inds, const std::vector<Point2D>& pts) | |
{ | |
// Empty Matrix - Number of points of size rows | |
Eigen::Matrix4Xf design_pts(4, cam_data.imgw); | |
int valid_points = 0; | |
// Calculate camera ray intersections for design points | |
Eigen::Vector2f p0(0, 0); | |
// Store angles |
View find_cam.cpp
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
static Eigen::Matrix4Xf findCameraIntersectionsOpt(const Datum& cam_data, const std::vector<int>& good_inds, const std::vector<Point2D>& pts) | |
{ | |
// ASK Question | |
// What does imgh actually refer to. Since we know the camera is rotated. Should I be using imgw | |
// I have changed it to imgw | |
// Empty Matrix - Number of points of size rows | |
Eigen::Matrix4Xf design_pts(4, cam_data.imgw); | |
int valid_points = 0; |
View gist:439960753bfe144ade3bace78fbc5ca2
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 numpy as np | |
import matplotlib.patches as patches | |
class BSpline(): | |
def __init__(self): | |
pass | |
self.warp = 4. | |
self.count = 26*2 |
View rospatch.patch
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
diff --git a/carla_ros_bridge/src/carla_ros_bridge/bridge.py b/carla_ros_bridge/src/carla_ros_bridge/bridge.py | |
index 6a77453..0057229 100755 | |
--- a/carla_ros_bridge/src/carla_ros_bridge/bridge.py | |
+++ b/carla_ros_bridge/src/carla_ros_bridge/bridge.py | |
@@ -367,8 +367,9 @@ class CarlaRosBridge(object): | |
elif carla_actor.type_id.startswith("sensor"): | |
if carla_actor.type_id.startswith("sensor.camera"): | |
if carla_actor.type_id.startswith("sensor.camera.rgb"): | |
+ if carla_actor.attributes["role_name"] == "noros": return None | |
actor = RgbCamera( |
NewerOlder