-
Notifications
You must be signed in to change notification settings - Fork 1
amcastro-tri/SoftBubble
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
What you'll find here: ====================== * doall_QP_membrane_solver.m: This is an example solver that moves a cube in front of the bubble and computes the bubble's deformations. You can change the imposed motions of the cube by modifying box_pose.m. This is a great entry point to find out what's in this directory. * box_pose.m: This file defines a method for the imposed motions in doall_QP_membrane_solver.m. * doall_generate_point_cloud_demo.m: a demo showing how to generate point cloud data for the bubble using a picoflex camera model. * doall_generate_solution_and_point_cloud.m: Given a pose X_BO of the object in the bubble frame B, this script computes the bubble deformation and sinthetizes a point cloud with Gaussian noise. It also FITS a mesh to the point cloud using a least squares procedure!!. * fit_mesh_to_point_cloud.m: this method takes a point cloud and an initial mesh. It finds a least squres fit mesh to the point cloud using a procedure similar to the one in Sorkine and Cohen-Or (2004) though with an actual deformation Laplacian. * doall_constrained_LSQ_demo.m: In this demo we: 1) Simulate the bubble's deformations given the pose of the box. 2) Simulate the point cloud given the bubble's deformations. 3) Solve for inverse problem which consists in finding the contact forces that cause deformations that best fit the point cloud. 4) Use the contact pressure interpolated onto the point cloud as a threshold to identify which points belong to the contact patch only. * Making/using the fitter from saved data: 1) Create fitter data and save it to a file with: doall_create_and_save_fitter_data.m This will generate a *.mat file with all data needed to create a fitter. 2) Make use of method fit_bubble_mode.m. See example in doall_fiter.m. Solver internals: ================= * QP_membrane_solver_preproc: Given the initial mesh and membrane tension T0, this preprocessing method computes all quantities in the problem that are constant through the solution process: - initial (node) mesh normals (area weighted). - Stiffness matrix K. - Aeq: Equality constraint matrix. It includes boundary conditions and (linearized) volume constraint. (Constraint is Aeq * u = 0). - node_areas: the area of each node when compute area weighted normals. This is computed by assembling the area of incident triangles to a node, only a third is assigned to each node. * QP_membrane_solver: Given the precomputed quantities by QP_membrane_solver_preproc plus the definition of the box and its pose, this method computes displacement u and returns the updated mesh positions p_WP = p_WP0 + u * normalP0_W. Working with rigid transforms: ============================== Utilities to create and operate 4x4 homogenous rigid transfor matrices. These include: - pose_inverse - transform_point - reexpress_vector - rotx, roty, rotz - MakeRpy - MakePose Utilities to read/write files: ============================== * vtk_write_*: A set of utilities to write headers, unstructured meshes scalar and vector fields. See doall_QP_membrane_solver for examples of usage. * read_obj: reads an obj triangle mesh file. * write_obj: writes a triangle mesh to an obj file. Utilities to generate meshes: ============================= You can use distmesh to make 2D meshes of circles and then rise them up to make spherical cap meshes. See rise_bubble. % Example: (Uniform Mesh on Unit Circle) fd=@(p) sqrt(sum(p.^2,2))-1; [p,t]=distmesh2d(fd,@huniform,0.2,[-1,-1;1,1],[]); From: https://popersson.github.io/distmesh/ - rise_bubble: Makes a mesh for a spherical cap given the mesh for a planar circle mesh. - calc_area_weighted_normals Basic geometry queries: ======================= - ray_to_plane - is_inside_box: is point inside box. - ray_to_box_inside: Ray cast from a given point only if point is insde. Empty result if point is outside.
About
Repo with the source for our paper on contact patch estimation.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published