Trajectory Optimization

Similar documents
Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

Non-holonomic Planning

Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

Discrete Motion Planning

Collision Detection. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

Humanoid Robotics. Inverse Kinematics and Whole-Body Motion Planning. Maren Bennewitz

Spring 2010: Lecture 9. Ashutosh Saxena. Ashutosh Saxena

Sampling-based Planning 2

Humanoid Robotics. Inverse Kinematics and Whole-Body Motion Planning. Maren Bennewitz

Robot Motion Control Matteo Matteucci

Advanced Robotics Path Planning & Navigation

Geometric Path Planning McGill COMP 765 Oct 12 th, 2017

Visual Navigation for Flying Robots. Motion Planning

Robotics Tasks. CS 188: Artificial Intelligence Spring Manipulator Robots. Mobile Robots. Degrees of Freedom. Sensors and Effectors

ECE276B: Planning & Learning in Robotics Lecture 5: Configuration Space

Planning, Execution and Learning Application: Examples of Planning for Mobile Manipulation and Articulated Robots

Cognitive Robotics Robot Motion Planning Matteo Matteucci

Planning in Mobile Robotics

Visibility Graph. How does a Mobile Robot get from A to B?

Robot Motion Planning

Robot Motion Planning

Sung-Eui Yoon ( 윤성의 )

Configuration Space of a Robot

Local Search Methods. CS 188: Artificial Intelligence Fall Announcements. Hill Climbing. Hill Climbing Diagram. Today

1 Trajectories. Class Notes, Trajectory Planning, COMS4733. Figure 1: Robot control system.

This week. CENG 732 Computer Animation. Warping an Object. Warping an Object. 2D Grid Deformation. Warping an Object.

Sub-optimal Heuristic Search and its Application to Planning for Manipulation

Algorithms for Sensor-Based Robotics: Sampling-Based Motion Planning

Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

Announcements. CS 188: Artificial Intelligence Fall Robot motion planning! Today. Robotics Tasks. Mobile Robots

CS 188: Artificial Intelligence Fall Announcements

Humanoid Robotics. Path Planning and Walking. Maren Bennewitz

CS 4649/7649 Robot Intelligence: Planning

Probabilistic Methods for Kinodynamic Path Planning

6.141: Robotics systems and science Lecture 10: Motion Planning III

Integrated Grasp and Motion Planning using Independent Contact Regions 1

Algorithms for Sensor-Based Robotics: Sampling-Based Motion Planning

A simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s

CS283: Robotics Fall 2016: Robot Arms

Optimization of a two-link Robotic Manipulator

Computer Game Programming Basic Path Finding

Chapter 3: Kinematics Locomotion. Ross Hatton and Howie Choset

Sampling-Based Motion Planning

15-494/694: Cognitive Robotics

Path Planning. Marcello Restelli. Dipartimento di Elettronica e Informazione Politecnico di Milano tel:

6.141: Robotics systems and science Lecture 10: Implementing Motion Planning

Navigation and Metric Path Planning

Path Planning for Point Robots. NUS CS 5247 David Hsu

Motion Planning. COMP3431 Robot Software Architectures

Path Planning. Jacky Baltes Dept. of Computer Science University of Manitoba 11/21/10

CS 775: Advanced Computer Graphics. Lecture 3 : Kinematics

Table of Contents. Chapter 1. Modeling and Identification of Serial Robots... 1 Wisama KHALIL and Etienne DOMBRE

Lecture 3: Motion Planning 2

Inverse Kinematics. Given a desired position (p) & orientation (R) of the end-effector

6.141: Robotics systems and science Lecture 9: Configuration Space and Motion Planning

Lecture «Robot Dynamics»: Kinematic Control

4 Kinematic Linkages. Chapter 4. Kinematic Linkages. Department of Computer Science and Engineering 4-1

Sub-Optimal Heuristic Search ARA* and Experience Graphs

Robots are built to accomplish complex and difficult tasks that require highly non-linear motions.

Lecture Schedule Week Date Lecture (W: 3:05p-4:50, 7-222)

Transformation. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Approximate path planning. Computational Geometry csci3250 Laura Toma Bowdoin College

Inverse Kinematics (part 1) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2018

Introduction to Optimization

IntroductionToRobotics-Lecture02

10/11/07 1. Motion Control (wheeled robots) Representing Robot Position ( ) ( ) [ ] T

Articulated Characters

Lecture 2 September 3

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial

Introduction to Mobile Robotics Path and Motion Planning. Wolfram Burgard, Cyrill Stachniss, Maren Bennewitz, Diego Tipaldi, Luciano Spinello

Kinematics, Kinematics Chains CS 685

Introduction to State-of-the-art Motion Planning Algorithms. Presented by Konstantinos Tsianos

Sampling-Based Robot Motion Planning. Lydia Kavraki Department of Computer Science Rice University Houston, TX USA

Lecture 3: Motion Planning (cont.)

Manipulator trajectory planning

ROBOTICS 01PEEQW. Basilio Bona DAUIN Politecnico di Torino

Search-based Planning with Motion Primitives. Maxim Likhachev Carnegie Mellon University

Algorithmic Robotics and Motion Planning

Advanced Robotics Path Planning & Navigation

Collision and Proximity Queries

Computer Animation. Rick Parent

Chapter 3 Numerical Methods

Parallel Robots. Mechanics and Control H AMID D. TAG HI RAD. CRC Press. Taylor & Francis Group. Taylor & Francis Croup, Boca Raton London NewYoric

Inverse Kinematics of 6 DOF Serial Manipulator. Robotics. Inverse Kinematics of 6 DOF Serial Manipulator

Written exams of Robotics 1

Control of industrial robots. Kinematic redundancy

Module 1 Lecture Notes 2. Optimization Problem and Model Formulation

for Motion Planning RSS Lecture 10 Prof. Seth Teller

Computer Animation. Algorithms and Techniques. z< MORGAN KAUFMANN PUBLISHERS. Rick Parent Ohio State University AN IMPRINT OF ELSEVIER SCIENCE

Applications. Human and animal motion Robotics control Hair Plants Molecular motion

1. Introduction 1 2. Mathematical Representation of Robots

A Reduced-Order Analytical Solution to Mobile Robot Trajectory Generation in the Presence of Moving Obstacles

Navigation methods and systems

Lecture VI: Constraints and Controllers

Efficient Motion and Grasp Planning for Humanoid Robots

Dexterous Manipulation Planning Using Probabilistic Roadmaps in Continuous Grasp Subspaces

CS4733 Class Notes. 1 2-D Robot Motion Planning Algorithm Using Grown Obstacles

Lesson 1 Introduction to Path Planning Graph Searches: BFS and DFS

Autonomous and Mobile Robotics Prof. Giuseppe Oriolo. Motion Planning 1 Retraction and Cell Decomposition

Transcription:

Trajectory Optimization Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering http://users.wpi.edu/~zli11

Recap We heard about RRT*, a sampling-based planning in high-dimensional cost spaces These kinds of methods can be quite time consuming, what if we need something fast? Trajectory optimization: Fast Made for optimality Has trouble with feasibility Has trouble with local minima A good choice if you really need speed and feasibility constraints aren t severe.

Examples Naïve optimization Smoothing (Arm) motion planning Use straight line segments to connect start, end and via points Optimize the piecewise trajectory for some merits (e.g. min time, energy consumption) Other concerns Obstacle avoidance Constraints

Trajectory Optimization Trajectory optimization has two roles Smooth and shorten trajectories generated by other methods (e.g. RRT) Plan from scratch given a initial trajectory that contains collisions and may violate constraints, optimize for a high-quality collision-free trajectory that satisfies constraints Key ingredients in trajectory optimization Numerical optimization methods Methods that check and penalize collision

Performance of Trajectory Optimization Algorithms Speed How fast to solve a problem of (high dimension)? Reliability Can it solve a large fraction of problem? Path quality Free of collision? Or even treat collision as hard constraints (e.g. keep a safe distance from the obstacles)? Flexibility How easy to add new constraints and cost function terms?

Problem Formulation Solve this optimization problem: arg min C ( ) - Uncertainty - Smoothness - Distance from obstacles. Subject to these constraints: Example? f ( ) 0 g( ) 0 h( ) 0 Example? Example?

Trajectory Space We are no longer searching in C-space, we are searching in trajectory space Trajectory space is infinite dimensional! We thus optimize on a discretization of a trajectory (still a lot of dimensions!) In the next slides we talk about gradients and sampling, we are talking about sampling/gradient for trajectories, not configurations.

How do we solve this? Many options and strategies. This is an active research area! arg min C f ( ) 0 ( ) g( ) 0 h( ) 0

Option 1: Gradient Descent Option 1: Put the constraints into the cost function and solve by gradient descent Very fast! What guarantees are there on optimality? What guarantees are there on feasibility?

Option 2: Linear/Quadratic/Convex programming Method Formulate the cost function to be linear/quadratic/convex Use linear/quadratic/convex programming to solve Pros and Cons Linear/quadratic/convex solver may not be very fast Some constraints/cost functions are hard to represent this way. Examples? What guarantees do we have on optimality?

Option 3: Combine options 1 and 2 Method Compute linear/quadratic/convex approximation to constraints/cost locally (i.e at the current ) Use it to get small deformation of trajectory (i.e. the gradient) and iterate Pros and Cons Very promising! Local linear/quadratic/convex approximation may still be hard to formulate

Option 4: Sampling Trajectory Space Method Sample around current trajectory in trajectory space Compute gradient from the information you learn by sampling, iterate Pros and Cons Don t need an approximate model of anything or to compute gradients; easy to implement Requires evaluating cost function on a lot of trajectories (could be slow) Very unclear how to sample well

Summary Trajectory optimization is usually faster for high-dimensional cost-space planning than sampling-based methods An active research area with many methods: 1. Put constraints in cost function and do gradient descent lagrange multipliers 2. Linear/quadratic/convex programming Limited application for real-world problems 3. Combine 1 and 2 4. Sample in trajectory space, compute gradient from samples Trajectory optimizers often have trouble with obstacles and local minima

Putting it all together Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering http://users.wpi.edu/~zli11

What is motion planning? The automatic generation of motion The fundamental concepts you need to know to do this are

Framework goal start continuous representation (configuration space formulation) discretization (random sampling, processing critical geometric events) graph searching (breadth-first, best-first, A*)

Discretization Sampling (random, with bias) Processing critical geometric features (Reduced) Visibility graph, Voronoi graph, cell decomposition Potential field

Not a Point Robot? Configuration Space Minkowski Sum

Configuration Space Usually No Analytical Solution Sampling How to compute C obs for articulated bodies?

Discrete Search Problem Formulation 1. State Space Goal The space of cells, usually in x,y coordinates 2. Successor Function A cell s successors are its neighbors 4 connected vs. 8 connected 3. Actions Move to a neighboring cell 4. Cost Function Distance between cells traversed Are costs the same for 4 vs 8 connected? 5. Goal Test Check if at goal cell Multiple cells can be marked as goals 4-connected 8-connected

A* Search Main idea: Select nodes based on costto-come and heuristic: f(x) = g(x) + h(x) Open list is a priority queue, nodes are sorted according to f(x) g(x) is sum of edge costs from root node to x This algorithm is the basis for MANY variants (D*, ARA*, ANA*, etc.)

Other Search Algorithms f s = g s + ε h(s) BFS DFS From Presentation by Abhishek Kulkarni: Anytime Non-Parametric A*

Representations of Rotation Euler angles are simplest but have singularity problems Besides you usually convert to rotation matrices to actually use them Quaternions are beautiful math but can be annoying to manipulate But, quaternions are perfect for some problems. For example: sampling 3D rotations Use Homogenous Transforms whenever possible. Easy to compose and manipulate (just linear algebra) Rotation and translation in one consistent package Not super-simple, but can read the coordinate axes by looking at columns Many software frameworks provide methods to convert between these representations (ROS, openrave)

Collision Checking Many representations, most popular for motion planning are Triangle meshes Composites of primitives (box, cylinder, sphere) Voxel grids Triangle meshes Composite of primitives Voxel

Collision Checking How to make it faster: 2. Use Bounding Volumes 1. Simplify your meshes AABBs OBBs Hierarchical Bounding Volumes

Static vs. Dynamic Collision Detection Static checks Dynamic checks

Usual Approach to Dynamic Checking 1) Discretize path at some fine resolution e 2) Test statically each intermediate configuration 3 e 2 3 1 3 2 e too large collisions are missed e too small slow test of local paths 3

Testing Path Segment vs. Finding First Collision PRM planning Detect collision as quickly as possible Bisection strategy Physical simulation, haptic interaction Find first collision Sequential strategy

Sampling-based Planning q new q init q near q rand PRM The good: Provides fast feasible solution Popular methods have few parameters Works on practical problems Works in high-dimensions Works even with the wrong distance metric RRT The bad: No quality guarantees on paths* In practice: smooth/optimize path afterwards No termination when there is no solution In practice: set an arbitrary timeout Probabilistic completeness is a weak property Completeness in high-dimensions is impractical

Sampling Strategies Obstacle-based PRM Gaussian Sampling Bridge Sampling quasi-random sampling

Variants of RRT BiDirectional RRT RRT with Obstacles and Goal Bias

Non-holonomic Constraints Parallel Parking Manipulation with a robotic hand Untethered space robots Underwater robot Forward propulsion is allowed only in the pointing direction Rolling without contact Conservation of angular momentum A Chosen actuation strategy

How to Plan? Exact methods Two-Point Boundary Value Problem (BVP) Apply sequence of allowed maneuvers Apply Sequences of Primitives Sampling-based methods [Knepper and Mason, ICRA 2009]

Grasp Restraint Form closure Force closure

Force-Closure Grasp Metric Many algorithms exist to test for force closure, here is one: Input: Contact locations Output: Is the grasp in Force-Closure? (Yes or No) 1. Approximate the friction cone at each contact with a set of wrenches 2. Combine wrenches from all cones into a set of points S in wrench space 3. Compute the convex hull of S 4. If the origin is inside the convex hull, return YES. If not, return NO. Friction cones at contacts Origin Wrench space (6 dimensional)

How to Efficiently Plan Grasp? Search Contact points on the surface of an object Hand pose relative to object with fingers in a pre-shape Search Force Closure Grasps Pre-computed grasp sets Integrating Grasping and Manipulation Planning Environment Clearance Score Grasp quality Reachability Score

Inverse Kinematics If N=M, Jacobian is square Standard matrix inverse If N>M, Pseudo-Inverse Minimize Weighted Pseudo-Inverse given that Minimize given that Damped least squares Iterative Jacobian Pseudo-Inverse

Iterative Jacobian Pseudo-Inverse Inverse Kinematics While true X current = FK(q current ) x = (x target - x current ) error = x If error < threshold return Success q = J q + x If( q > a) q = a(q / q ) q current = q current - q Configuration q current X current X target end F 0 This is a local method, it will get stuck in local minima (i.e. joint limits)!!! a is the step size Error handling not shown A correction matrix has to be applied to the angular velocity components to map them into the target frame (not shown)

Hand Pose Torque Balance Goal Set Close chain

Configuration Space (C-space) Joint 3 Joint 1 Joint 2

Constrained BiDirectional RRT (CBiRRT) q target q s q near Start

Trajectory Optimization Solve this optimization problem: Subject to these constraints: arg min C( ) trajectory trajectory f ( ) 0 g( ) 0 h( ) 0 An active research area with many methods: 1. Put constraints in cost function and do gradient descent 2. Linear/quadratic/convex programming 3. Combine 1 and 2 4. Sample in trajectory space, compute gradient from samples -Uncertainty -Smoothness -Uncertainty -Distance -Smoothness from obstacles. -Distance from obstacles. e.g. pose constraints e.g. pose constraints e.g. joint limits e.g. joint limits e.g. collision constraints e.g. collision constraints Trajectory optimizers often have trouble with complex obstacles and local minima

Planner Types Exact algorithms Either find a solution or prove none exists Very computationally expensive Unsuitable for high-dimensional spaces Discrete Search Divide space into a grid, use A* to search Good for vehicle planning Unsuitable for high-dimensional spaces Sampling-based Planning Sample the C-space, construct path from samples Good for high-dimensional spaces Weak completeness and optimality guarantees Trajectory Optimization Fast local planning using optimization algorithms Can converge to infeasible local minima when feasibility constraints are difficult

What planning algorithms should we use? Roomba icreate Mars Rovers DARPA Urban Challenge Google Self-Driving Car 44

What planning algorithms should we use? Factory Automation Rigid Object Manipulation Humanoid Manipulation Deformable Object Manipulation 45

46 What planning algorithms should we use for assembly/disassembly planning?

47 What planning algorithms should we use for protein docking?

48 What problems would you like to solve?