Generating a trajectory of quaternions between two given quaternions

First, check my previous post on slerp to learn how to interpolate between two quaternions.

In this post, we make a function that uses the previously developed interpolation to generate n points (quaternions) between and initial and a final quaternion namely, q_0, q_1.

Our previous function uses a ratio as an input that defines the ration (distance) from the first quaternion to the interpolated one. The main idea here is to start from the initial quaternion and increase the ration gradually from 0 to 1 by the given number of steps. At each level we interpolate and generate a new point and we add that to our trajectory.

Let say we want two point between the initial and the final given quaternions. The whole process is as follows:

n = 2
Q=zeros(n+2,4)
Q(1,:) = q_0
Q(2,:) = slerp(q_0,q_1,0.33)
Q(3,:) = slerp(q_0,q_1,0.66)
Q(4,:) = q_1

This process can be written in a function as follows:

function Q = quatinterpn(q0,q1,n)
q0 = quatnormalize(q0);
q1 = quatnormalize(q1);
Q = zeros(n,4);
Q(1,:) = q0;
Q(end,:) = q1;
h = linspace(0,1,n);
for ii=2:n-1
Q(ii,:) = quatinterp(q0,q1,h(ii),'slerp');
end
end

We can test the function as follows:

q0 = [1.0 0 1.0 0];
q1 = [-1.0 0 1.0 0];
n = 20;
Q = quatinterpn(q0,q1,n);

it will result in a trajectory as illustrated in this figure:

untitled

 

Posted in control, Linux, Machine Learning, MATLAB, programming, Robotics, ROS, Software, Ubuntu, Uncategorized | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Slerp: Spherical linear interpolation in quaternion space

in my previous post, I explained the simple Lerp method for calculating linear interpolation in the quaternion space. I also mentioned that while normalizing the output could help to get an optimized result, the velocity curve is not constant. To avoid this problem, instead of doing a simple linear interpolation, we can interpolate on an arc on the quaternion unit sphere. This method is called Slerp which stands for Spherical linear interpolation and it works as follows:

Given q_0, q_1 \in H_1 and h \in [0,1] the following functions express slerp equivalently:

slerp(q_0,q_1,h) = p(p^*q)^h

slerp(q_0,q_1,h) = p(q^*)^{1-h} q

slerp(q_0,q_1,h) = (q p^*)^h p

slerp(q_0,q_1,h) = q(q^*p)^{1-h}

And it can be shown that:

slerp(q_0,q_1,h) = slerp(q_0,q_1,1-h)

 

Using these equations, Slerp follows the great arc which is also the shortest path on the unit sphere. Slerp also has the constant angular velocity.

A Matlab example is as follows:


q0 = quatnormalize([1.0 0 1.0 0]);
q1 = quatnormalize([-1.0 0 1.0 0]);
qi = quatinterp(q0,q1,0.5,'slerp')

qi =

0 0 1 0

Check out my previous post about Lerp which is a simpler linear interpolation.

Check out my next post about interpolating more than one point between two given quaternions and making a trajectory.

Posted in Linux, Machine Learning, MATLAB, Optimization, programming, Robotics, ROS, Software, Ubuntu, Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Lerp: Linear interpolation in quaternion space

Lerp stands for Linear interpolation. It is method for linearly interpolate between quaternions.

Consider q_0 and q_1 as two quaternions and h \in [0,1]. Lerp works as follows:

Lerp(q_0,q_1,h) = q_0(1-h) + q_1 h

The interpolation curve for the linear interpolation (Lerp) gives a straight line in quaternion space and the line connects two points q_0 and q_1 with a shortcut that goes below the surface of the unit sphere. Normalizing the result could resolve this issue. However, the velocity curve would not be constant and because of that it is better to use other methods.

Matlab usage is as follows:


q0 = quatnormalize([1.0 0 1.0 0]);
q1 = quatnormalize([-1.0 0 1.0 0]);
qi = quatinterp(q0,q1,0.5,'lerp')

qi =

0 0 0.7071 0

Check my next post about Slerp.

Posted in Linux, Machine Learning, MATLAB, Optimization, Robotics, ROS, Software, Ubuntu, Uncategorized | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Robotics on arXiv 7/18/2017

Robotics on arXiv.org

Submissions on 18-07-2017

[1]  arXiv:1707.05303 [pdf, other] link

Title: Aggressive Deep Driving: Model Predictive Control with a CNN Cost Model

Authors:
Paul Drews,
Grady Williams,
Brian Goldfain,
Evangelos A. Theodorou,
James M. Rehg

Comments: 11 pages, 7 figures

Subjects: Robotics (cs.RO)


[2]  arXiv:1707.05301 [pdf, other] link

Title: Cheap or Robust? The Practical Realization of Self-Driving Wheelchair Technology

Authors:
Maya Burhanpurkar,
Mathieu Labbé,
Charlie Guan,
François Michaud,
Jonathan Kelly

Comments: To appear in Proceedings of the IEEE International Conference on Rehabilitation Robotics (ICORR’17), London, UK, July 17-20, 2017

Subjects: Robotics (cs.RO)


[3]  arXiv:1707.05110 [pdf, other] link

Title: Control of a Quadrotor with Reinforcement Learning

Authors:
Jemin Hwangbo,
Inkyu Sa,
Roland Siegwart,
Marco Hutter

Subjects: Robotics (cs.RO)


[4]  arXiv:1707.05077 [pdf, ps, other] link

Title: Lower Bounds for Searching Robots, some Faulty

Authors:
Andrey Kupavskii,
Emo Welzl

Subjects: Robotics (cs.RO); Distributed, Parallel, and Cluster Computing (cs.DC)


[5]  arXiv:1707.04821 [pdf] link

Title: Geometric Jacobians Derivation and Kinematic Singularity Analysis for Smokie Robot Manipulator & the Barrett WAM

Authors:
Reza Yazdanpanah Abdolmalaki

Subjects: Robotics (cs.RO)


[6]  arXiv:1707.04820 [pdf] link

Title: Development of Direct Kinematics and Workspace Representation for Smokie Robot Manipulator & the Barret WAM

Authors:
Reza Yazdanpanah Abdolmalaki

Subjects: Robotics (cs.RO)


[7]  arXiv:1707.04674 [pdf, other] link

Title: ADAPT: Zero-Shot Adaptive Policy Transfer for Stochastic Dynamical Systems

Authors:
James Harrison,
Animesh Garg,
Boris Ivanovic,
Yuke Zhu,
Silvio Savarese,
Li Fei-Fei,
Marco Pavone

Subjects: Robotics (cs.RO)


[8]  arXiv:1707.04629 [pdf, other] link

Title: Compliant Movement Primitives in a Bimanual Setting

Authors:
Aleksandar Batinica,
Bojan Nemec,
Aleš Ude,
Mirko Raković,
Andrej Gams

Comments: 1st, unpolished version, 7 pages

Subjects: Robotics (cs.RO)


[9]  arXiv:1707.04617 [pdf, other] link

Title: A Real-Time Solver For Time-Optimal Control Of Omnidirectional Robots with Bounded Acceleration

Authors:
David Balaban,
Joydeep Biswas

Subjects: Robotics (cs.RO)


[10]  arXiv:1707.04796 (cross-list from cs.CV) [pdf, other] link

Title: A Pipeline for Generating Ground Truth Labels for Real RGBD Data of Cluttered Scenes

Authors:
Pat Marion,
Peter R. Florence,
Lucas Manuelli,
Russ Tedrake

Subjects: Computer Vision and Pattern Recognition (cs.CV); Robotics (cs.RO)


[11]  arXiv:1707.04578 [pdf, other] link

Title: An Efficient Approach to Communication-aware Path Planning for Long-range Surveillance Missions undertaken by UAVs

Authors:
Hrishikesh Sharma,
Tom Sebastian

Comments: 46 pages. One part of this thesis, handling the turn constrained route planning, has been published at ECMR’17

Subjects: Robotics (cs.RO)


[12]  arXiv:1707.04540 [pdf, other] link

Title: Autonomous Racing with AutoRally Vehicles and Differential Games

Authors:
Grady Williams,
Brian Goldfain,
Paul Drews,
James M. Rehg,
Evangelos A. Theodorou

Comments: 8 pages, 7 figures

Subjects: Robotics (cs.RO)


[13]  arXiv:1707.04294 [pdf, other] link

Title: Ergodic Coverage In Constrained Environments Using Stochastic Trajectory Optimization

Authors:
Elif Ayvali,
Hadi Salman,
Howie Choset

Comments: Accepted, IROS 2017

Subjects: Robotics (cs.RO)


[14]  arXiv:1707.04489 (cross-list from cs.AI) [pdf, other] link

Title: Freeway Merging in Congested Traffic based on Multipolicy Decision Making with Passive Actor Critic

Authors:
Tomoki Nishi,
Prashant Doshi,
Danil Prokhorov

Comments: 6 pages, 5 figures. ICML Workshop on Machine Learning for Autonomous Vehicles

Subjects: Artificial Intelligence (cs.AI); Robotics (cs.RO)


[15]  arXiv:1707.04444 (cross-list from cs.CV) [pdf, ps, other] link

Title: Monocular Visual Odometry for an Unmanned Sea-Surface Vehicle

Authors:
George Terzakis,
Riccardo Polvara,
Sanjay Sharma,
Robert Sutton

Subjects: Computer Vision and Pattern Recognition (cs.CV); Robotics (cs.RO)


[16]  arXiv:1707.04173 [pdf] link

Title: Review: Modeling and Classical Controller Of Quad-rotor

Authors:
Tarek N.Dief,
Shigeo Yoshida

Comments: IRACST – International Journal of Computer Science and Information Technology & Security (IJCSITS), ISSN: 2249-9555 Vol. 5, No4, August 2015

Subjects: Robotics (cs.RO)


[17]  arXiv:1707.04084 [pdf, other] link

Title: An Earthworm-Inspired Soft Crawling Robot Controlled by Friction

Authors:
Joey Z. Ge,
Ariel A. Calderón,
Néstor O. Pérez-Arancibia

Comments: 8 pages, 9 figures, 1 table

Subjects: Robotics (cs.RO)


[18]  arXiv:1707.03976 [pdf, other] link

Title: Asymptotic Optimality of Rapidly Exploring Random Tree

Authors:
Titas Bera,
Debasish Ghose,
Sundaram Suresh

Subjects: Robotics (cs.RO)


[19]  arXiv:1707.04151 (cross-list from cs.LO) [pdf, ps, other] link

Title: The Reach-Avoid Problem for Constant-Rate Multi-Mode Systems

Authors:
Shankara Narayanan Krishna,
Aviral Kumar,
Fabio Somenzi,
Behrouz Touri,
Ashutosh Trivedi

Comments: 26 pages

Subjects: Logic in Computer Science (cs.LO); Formal Languages and Automata Theory (cs.FL); Robotics (cs.RO)


[20]  arXiv:1707.03899 (cross-list from math.AT) [pdf, other] link

Title: A Topologist’s View of Kinematic Maps and Manipulation Complexity

Authors:
Petar Pavešić

Comments: 24 pages, 15 figures

Subjects: Algebraic Topology (math.AT); Robotics (cs.RO)


[21]  arXiv:1707.03734 [pdf, other] link

Title: A Decentralized Multi-Agent Unmanned Aerial System to Search, Pick Up, and Relocate Objects

Authors:
Rik Bähnemann,
Dominik Schindler,
Mina Kamel,
Roland Siegwart,
Juan Nieto

Comments: Submitted to the 15th IEEE International Symposium on Safety, Security, and Rescue Robotics 2017 (SSRR 2017)

Subjects: Robotics (cs.RO)


[22]  arXiv:1707.03804 (cross-list from cs.CL) [pdf, other] link

Title: Source-Target Inference Models for Spatial Instruction Understanding

Authors:
Hao Tan,
Mohit Bansal

Comments: 11 pages

Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Learning (cs.LG); Robotics (cs.RO)


[23]  arXiv:1707.03469 (cross-list from cs.CV) [pdf, ps, other] link

Title: Mobile Robot Localization via Machine Learning

Authors:
Alexander Kuleshov,
Alexander Bernstein,
Evgeny Burnaev

Comments: 15 pages

Subjects: Computer Vision and Pattern Recognition (cs.CV); Learning (cs.LG); Robotics (cs.RO); Applications (stat.AP)


[24]  arXiv:1707.03435 (cross-list from cs.CV) [pdf] link

Title: Obstacle detection test in real-word traffic contexts for the purposes of motorcycle autonomous emergency braking (MAEB)

Authors:
Giovanni Savino,
Simone Piantini,
Gustavo Gil,
Marco Pierini

Comments: 25th International Technical Conference on the Enhanced Safety of Vehicles (2017)

Subjects: Computer Vision and Pattern Recognition (cs.CV); Robotics (cs.RO)


[25]  arXiv:1707.03080 [pdf, other] link

Title: Robot Autonomy for Surgery

Authors:
Michael Yip,
Nikhil Das

Subjects: Robotics (cs.RO)


Posted in Robotics | Tagged , , , , , , , , , , , , , | Leave a comment

Robotics on arXiv – 6/July/2017

Robotics on arXiv.org

Submissions on 06-07-2017

[1]  arXiv:1707.01152 [pdf, other] link

Title: Improving Foot-Mounted Inertial Navigation Through Real-Time Motion Classification

Authors:
Brandon Wagstaff,
Valentin Peretroukhin,
Jonathan Kelly

Comments: To appear in proceedings of 2017 International Conference on Indoor Positioning an Indoor Navigation (IPIN), 18-21 September 17, Sapporo, Japan

Subjects: Robotics (cs.RO); Human-Computer Interaction (cs.HC)


[2]  arXiv:1707.01495 (cross-list from cs.LG) [pdf, other] link

Title: Hindsight Experience Replay

Authors:
Marcin Andrychowicz,
Filip Wolski,
Alex Ray,
Jonas Schneider,
Rachel Fong,
Peter Welinder,
Bob McGrew,
Josh Tobin,
Pieter Abbeel,
Wojciech Zaremba

Subjects: Learning (cs.LG); Artificial Intelligence (cs.AI); Neural and Evolutionary Computing (cs.NE); Robotics (cs.RO)

Posted in Robotics | Tagged , , , , , , , , , | Leave a comment

Robotics on arXiv.org 5/July/2017

Robotics on arXiv.org

Submissions on 05-07-2017


[1]  arXiv:1707.00893 [pdf, other] link

Title: Optimization Beyond the Convolution: Generalizing Spatial Relations with End-to-End Metric Learning

Authors:
Philipp Jund,
Andreas Eitel,
Nichola Abdo,
Wolfram Burgard

Comments: Submitted to CoRL 2017. Supplementary Video: this https URL

Subjects: Robotics (cs.RO)


[2]  arXiv:1707.00484 [pdf, other] link

Title: A Projected Inverse Dynamics Approach for Dual-arm Cartesian Impedance Control

Authors:
Hsiu-Chin Lin,
Joshua Smith,
Keyhan Kouhkiloui Babarahmati,
Niels Dehio,
Michael Mistry

Comments: Under review

Subjects: Robotics (cs.RO)


[3]  arXiv:1707.00318 [pdf, other] link

Title: Sampling-based Planning of In-Hand Manipulation with External Pushes

Authors:
Nikhil Chavan-Dafle,
Alberto Rodriguez

Comments: International Symposium on Robotics Research 2017 (Submitted)

Subjects: Robotics (cs.RO)


[4]  arXiv:1707.00051 (cross-list from cs.CV) [pdf, other] link

Title: Failing to Learn: Autonomously Identifying Perception Failures for Self-driving Cars

Authors:
Manikandasriram S.R.,
Cyrus Anderson,
Ram Vasudevan,
Matthew Johnson-Roberson

Subjects: Computer Vision and Pattern Recognition (cs.CV); Robotics (cs.RO)

Posted in Robotics | Tagged , , , , , , , , , , | Leave a comment

Robotics on arXiv – 7/4/2017

Robotics on arXiv.org

Submissions on 04-07-2017

[1]  arXiv:1707.00484 [pdf, other] link

Title: A Projected Inverse Dynamics Approach for Dual-arm Cartesian Impedance Control

Authors:
Hsiu-Chin Lin,
Joshua Smith,
Keyhan Kouhkiloui Babarahmati,
Niels Dehio,
Michael Mistry

Comments: Under review

Subjects: Robotics (cs.RO)


[2]  arXiv:1707.00318 [pdf, other] link

Title: Sampling-based Planning of In-Hand Manipulation with External Pushes

Authors:
Nikhil Chavan-Dafle,
Alberto Rodriguez

Comments: International Symposium on Robotics Research 2017 (Submitted)

Subjects: Robotics (cs.RO)


[3]  arXiv:1707.00051 (cross-list from cs.CV) [pdf, other] link

Title: Failing to Learn: Autonomously Identifying Perception Failures for Self-driving Cars

Authors:
Manikandasriram S.R.,
Cyrus Anderson,
Ram Vasudevan,
Matthew Johnson-Roberson

Subjects: Computer Vision and Pattern Recognition (cs.CV); Robotics (cs.RO)


[4]  arXiv:1706.10151 [pdf, ps, other] link

Title: A ROS multi-ontology references services: OWL reasoners and application prototyping issues

Authors:
Luca Buoncompagni,
Alessio Capitanelli,
Fulvio Mastrogiovanni

Comments: Submitted to the IEEE RO-MAN 2017 Workshop on “Autonomous Robot Ontology”, Lisbon Portugal, August 28, 2017

Subjects: Robotics (cs.RO); Artificial Intelligence (cs.AI); Human-Computer Interaction (cs.HC)


[5]  arXiv:1706.09949 [pdf, other] link

Title: Efficient, High-Quality Stack Rearrangement

Authors:
Shuai D. Han,
Nicholas M. Stiffler,
Kostas E. Bekris,
Jingjin Yu

Comments: MRS 2017 submission with appendices

Subjects: Robotics (cs.RO)


[6]  arXiv:1706.09911 [pdf, other] link

Title: Grasp Pose Detection in Point Clouds

Authors:
Andreas ten Pas,
Marcus Gualtieri,
Kate Saenko,
Robert Platt

Comments: arXiv admin note: text overlap with arXiv:1603.01564

Subjects: Robotics (cs.RO)


[7]  arXiv:1706.09932 (cross-list from cs.MA) [pdf, other] link

Title: Scalable Asymptotically-Optimal Multi-Robot Motion Planning

Authors:
Andrew Dobson,
Kiril Solovey,
Rahul Shome,
Dan Halperin,
Kostas E. Bekris

Comments: 8 pages, 12 figures, submitted to the first International Symposium on Multi-Robot and Multi-Agent Systems (MRS)

Subjects: Multiagent Systems (cs.MA); Robotics (cs.RO)


[8]  arXiv:1706.09829 [pdf, other] link

Title: Towards Monocular Vision based Obstacle Avoidance through Deep Reinforcement Learning

Authors:
Linhai Xie,
Sen Wang,
Andrew Markham,
Niki Trigoni

Comments: Accepted by RSS 2017 workshop New Frontiers for Deep Learning in Robotics

Subjects: Robotics (cs.RO)


[9]  arXiv:1706.09724 [pdf, ps, other] link

Title: Kinematics and workspace analysis of a 3ppps parallel robot with u-shaped base

Authors:
Damien Chablat (IRCCyN),
Luc Baron (EPM),
Ranjan Jha (EPM)

Subjects: Robotics (cs.RO)


[10]  arXiv:1706.09520 (cross-list from cs.LG) [pdf, other] link

Title: Neural SLAM

Authors:
Jingwei Zhang,
Lei Tai,
Joschka Boedecker,
Wolfram Burgard,
Ming Liu

Comments: A video of our experiments can be found at: this https URL

Subjects: Learning (cs.LG); Artificial Intelligence (cs.AI); Robotics (cs.RO)


[11]  arXiv:1706.09351 [pdf, other] link

Title: Near-Optimal Edge Evaluation in Explicit Generalized Binomial Graphs

Authors:
Sanjiban Choudhury,
Shervin Javdani,
Siddhartha Srinivasa,
Sebastian Scherer

Subjects: Robotics (cs.RO)


[12]  arXiv:1706.09153 [pdf, ps, other] link

Title: Drawbacks and alternatives to the numerical calculation of the base inertial parameters expressions for low mobility mechanisms

Authors:
Xabier Iriarte,
Javier Ros,
Aitor Plaza,
Jokin Aginaga,
Vicente Mata

Comments: 12 pages, 5 figures

Subjects: Robotics (cs.RO)


[13]  arXiv:1706.09068 [pdf, other] link

Title: ROS Navigation Tuning Guide

Authors:
Kaiyu Zheng

Comments: 19 pages, 21 figures

Subjects: Robotics (cs.RO)


[14]  arXiv:1706.09347 (cross-list from cs.AI) [pdf, other] link

Title: Path planning for Robotic Mobile Fulfillment Systems

Authors:
Marius Merschformann,
Lin Xie,
Daniel Erdmann

Subjects: Artificial Intelligence (cs.AI); Robotics (cs.RO)


[15]  arXiv:1706.08932 [pdf, other] link

Title: Iterative Sequential Action Control for Stable, Model-Based Control of Nonlinear Systems

Authors:
Emmanouil Tzorakoleftherakis,
Todd Murphey

Comments: Submitted for publication

Subjects: Robotics (cs.RO); Systems and Control (cs.SY)


[16]  arXiv:1706.08931 [pdf, ps, other] link

Title: Managing a Fleet of Autonomous Mobile Robots (AMR) using Cloud Robotics Platform

Authors:
Aniruddha Singhal,
Nishant Kejriwal,
Prasun Pallav,
Soumyadeep Choudhury,
Rajesh Sinha,
Swagat Kumar

Comments: 14 pages, 15 figures, journal paper

Subjects: Robotics (cs.RO)


[17]  arXiv:1706.08697 [pdf, other] link

Title: Controlled Tactile Exploration and Haptic Object Recognition

Authors:
Massimo Regoli,
Nawid Jamali,
Giorgio Metta,
Lorenzo Natale

Subjects: Robotics (cs.RO); Learning (cs.LG)


[18]  arXiv:1706.08685 [pdf, other] link

Title: Material Recognition CNNs and Hierarchical Planning for Biped Robot Locomotion on Slippery Terrain

Authors:
Martim Brandao,
Yukitoshi Minami Shiguematsu,
Kenji Hashimoto,
Atsuo Takanishi

Subjects: Robotics (cs.RO); Computer Vision and Pattern Recognition (cs.CV)


[19]  arXiv:1706.08560 [pdf, other] link

Title: Skill Learning by Autonomous Robotic Playing using Active Learning and Creativity

Authors:
Simon Hangl,
Vedran Dunjko,
Hans J. Briegel,
Justus Piater

Subjects: Robotics (cs.RO)


[20]  arXiv:1706.08775 (cross-list from cs.CV) [pdf, other] link

Title: Topometric Localization with Deep Learning

Authors:
Gabriel L. Oliveira,
Noha Radwan,
Wolfram Burgard,
Thomas Brox

Comments: 16 pages, 7 figures, ISRR 2017 submission

Subjects: Computer Vision and Pattern Recognition (cs.CV); Robotics (cs.RO)


Posted in Robotics | Tagged , , , , , , , , | Leave a comment