This repository contains the necessary libraries, scripts and instructions to learn a Dual-Arm Self-Collision Avoidance Boundary. With the following steps you can learn a Self-Collision-Avoidance Boundary for a Dual-Arm Maniupulator setup that is used as a constraint for a centralized inverse kinematic solver, as described in [1,2]:
[1] Nadia Figueroa ,Sina Mirrazavi, and Aude Billard, "Multi-Arm Self-Collision Avoidance: A Sparse Solution for a Big Data Problem" ICRA 2018 Workshop on Machine Learning in the Planning and Control of Robot Motion [Under Review]
[2] Sina Mirrazavi, Nadia Figueroa and Aude Billard, "A Unified Framework for Coordinated
Multi-Arm Motion Planning" International Journal of Robotics Research [In press]
- SCA-dataset-construction: Constructs a dataset of 'collided' and 'boundary' joint configurations.
- ML_toolbox: We use the cross-validation/grid-search functions + standard SVM learning (from libSVM libary).
- SVMGrad: SVMGrad is a compact library used to evaluate the decision function of a Gaussian RBF Kernel Support Vector Machine, as well as the its first Derivative (Gradient) in both MATLAB and C++.
- QP-IK-Solver: Centralized inverse kinematic (IK) solver for multi-arm systems formulated as a quadratic program with self-collision-avoidance constraints.
Follow the instructions of the README file in SCA-dataset-construction package, you should modify the following input paramaters:
- Sampling resolution (joint angle increment, the 'resolution' variable is a multipler for 10 deg increments, i.e. resolution=2 gives a 20deg increment)
- Location of the robot bases wrt to each other
- DH parameters of the manipulators
- Joint workspace constraints, if any.
This will generate a folder ./data which contains text files for the collided (y=-1) and non-collided (y=+1) joint configurations in form of the 3D positions of all joints wrt. one of the robot bases (the one defined as the origin x = [0 0 0]). This is the feature space that the SCA Boundary is learned in, if you have N joints (for all robots) your feature vector is .
Make sure to add all subfolders to your current directory and run the following script:
boundary_learning_robots.m
This will search for the optimal hyper-parameters that achieve the highest TPR and lowest FPR.
Note: The training stage in is not linearly increasing, i.e. a sample size of 12k point takes around 1 day, while a sample size of 24k take around 3 days.
Using the optimal hyper-parameters learned from the previous step, you will now train a sparse SVM with a support vector budget K, this is set to default = 3,000.
For a simple 2D example which can be visualized using SVMGrad run the following script:
boundary_learning_sparse_CSPS_2D.m
For a real robot dataset, run the following script:
boundary_learning_sparse_CSPS_robots.m
Once you've followed all the steps, you will have a MATLAB struct named cpsp_model_robots this contains all the parameters of the learnt SVM model:
- Support Vectors
- bias
- alpha*y
- gamma (i.e. inverse of Sigma)
Save the cpsp_model_robots struct AND some samples of the training (or testing) dataset for the next step.
Follow the instructions of the README file in SVMGradp ackage...
TODO: Must write instructions for this...
Step 5: Test it on the real robots using the QP-IK-Solver testing package, this can be done in simulation.
Follow the instructions of the README file in QP-IK-Solver package...
TODO: Must write instructions for this...
Current Maintainer: Nadia Figueroa (nadia.figueroafernandez AT epfl dot ch)