function [a,b,c] = getLineThroughTwoPoints(p1, p2)
% getLineThroughTwoPoints returns equation for the line through two points.
% [a,b,c] = getLineThroughTwoPoints(p1,p2)
% Function takes two arguments, p1 = [x1,y1] and p2 = [x2,y2],
% and returns [a,b,c]
Lecture Notes on
Robotic Planning and Kinematics
Francesco Bullo
With Programming Assignments by Joey W. Durham
This version: March 28, 2014. This document is for personal use only and may not be
circulated or reproduced, in whole or in part. Copyright c
close all
% Intialize polygons
% Obstacles and links are modeled as polygons
Poly1 = [-0.6,0.3;-0.4,-0.4;0.7,-0.3;0.6,0.4;0.2,0.3;-0.296057,0.596997];
Poly2 = [-0.8,-0.4;-0.1,-0.1;0.9,-0.4;0.3,0.2;0.102922,0.598169;-0.3,0.4];
Poly1 = Poly1 + ones(size(Pol
close all
% Intialize polygons
% Obstacles and links are modeled as polygons
Poly1 = [-0.6,0.3;-0.4,-0.4;0.7,-0.3;0.6,0.4;0.2,0.3;-0.296057,0.596997];
Poly2 = [-0.8,-0.4;-0.1,-0.1;0.9,-0.4;0.3,0.2;0.102922,0.598169;-0.3,0.4];
Poly1 = Poly1 + ones(size(Pol
function bCollide = checkCollisionBetweenPolygons( P1,P2 )
% Returns a boolean indicating whether two arbitrary polygons collide.
% Requires to polygons defined as n-by-2 arrays of counterclockwise points.
% Function first tests whether any vertices of on
function path = computeBugBasePath( start, goal, PolyList )
% Computes the path a Bug would follow until it hits an obstacle.
% Function requires start and goal point as well as a cell array of
% polygonal obstacles and returns an ordered list of all of t
function path = computeBug1Path( start, goal, PolyList )
% Computes the path from start to goal using the Bug1 algorithm.
% Function requires start and goal point as well as a cell array of
% polygonal obstacles and returns an ordered list of all of the p
%
% Intro to Robotics, ME170A/ECE181A, Spring 2011
% Joey Durham
% Modified by Anahita Mirtabatabaei
% June 4, 2011
%
% This code will rotate an inner cube wrt an outer cube,
% both centered at origin.
close all
clc
clear all
k = [1 1 1]';
theta = pi/3;
R
%
% Intro to Robotics, ME170A/ECE181A, Spring 2009
% Joey Durham
% April 15, 2009
%
% Computes the free configuration space for a simple two link manipulator.
% The two links are modeled as rectangles with semi-circles attached to the
% ends, meaning each
%
% Intro to Robotics, ME170A/ECE181A, Spring 2010
% Joey Durham
% May 13, 2010
%
% This script tests a polygon collision detector with four scenarios, one
% where some vertices of one polygon are inside the other, one where two
% polygons collide without
%
% Intro to Robotics, ME170A/ECE181A, Spring 2011
% Carlos Torres
% May 1, 2011
%
% For n = 100 in the unit square X = [0, 1]2 in the plane
% this code plots the following sample sets:
% 1. the uniform Sukharev center grid,
% 2. a random uniformly gen
% Sample MATLAB Code to compute BFS edges
% based on Adjacency Lookup Table
% number of nodes and lookup table for edges
n = 5;
AdjTablecfw_1 = [2];
AdjTablecfw_2 = [1,3,4];
AdjTablecfw_3 = [2,5];
AdjTablecfw_4 = [2];
AdjTablecfw_5 = [3];
% start and goa
function [u_x, u_y] = computeTangentVectorToPolygon(q, P)
% Computes the right-turning tangent vector to a polygon from a point.
% Function requires the point to test q = [x,y] and a n x 2 array of
% counterclockwise points, P, defining the polygon.
%
% I