Difference between revisions of "Stability of an Assembly Project"

From Mech
Jump to navigationJump to search
Line 16: Line 16:
Unlike the form and force closure linear programming tests, where the elements of your contact vector had to be greater than or equal to a positive value, in this problem the elements of your contact vector only need to be nonnegative. (You are only trying to find one solution to the assembly equilibrium equations; in the form and force closure tests, you needed to show that the contacts could create arbitrary wrenches.)
Unlike the form and force closure linear programming tests, where the elements of your contact vector had to be greater than or equal to a positive value, in this problem the elements of your contact vector only need to be nonnegative. (You are only trying to find one solution to the assembly equilibrium equations; in the form and force closure tests, you needed to show that the contacts could create arbitrary wrenches.)


Your biggest job in this programming assignment is taking the specifications of the bodies' mass properties and the contacts and turning them into static equilibrium equations as shown in Example 12.11. These equations are solved by linear programming with the constraint that the elements of the contact vector <math>k</math> must all be nonnegative. If you have <math>m</math> bodies in the assembly, you will have <math>3m</math> wrench balance equations, and if you have <math>n</math> contacts, you will have <math>2n</math> friction cone edges and therefore <math>2n</math> elements in your contact vector <math>k</math>.
Your biggest job in this programming assignment is taking the specifications of the bodies' mass properties and the contacts and turning them into static equilibrium equations of the form <math>Fk = b</math>, similar to Example 12.11. These equations are solved by linear programming with the constraint that the elements of the contact vector <math>k</math> must all be nonnegative. If you have <math>m</math> bodies in the assembly, you will have <math>3m</math> wrench balance equations, and if you have <math>n</math> contacts, you will have <math>2n</math> friction cone edges and therefore <math>2n</math> elements in your contact vector <math>k</math>.


=== Testing Your Program ===
=== Testing Your Program ===

First test your program using the assembly shown in the image at the top of the page. First choose


You will test your program on two assemblies, one that can stand and one that must collapse. You may use the example on this page, where your only remaining freedoms are the choices of the masses of the bodies and the choices of the friction coefficients at the contacts. For one of your test assemblies, choose these so the assembly can remain standing. For your other test assembly, choose these so the assembly must collapse.
You will test your program on two assemblies, one that can stand and one that must collapse. You may use the example on this page, where your only remaining freedoms are the choices of the masses of the bodies and the choices of the friction coefficients at the contacts. For one of your test assemblies, choose these so the assembly can remain standing. For your other test assembly, choose these so the assembly must collapse.

Revision as of 14:04, 20 May 2018

This page describes the "Stability of an Assembly" Project from the Coursera course "Modern Robotics, Course 5: Robot Manipulation and Wheeled Mobile Robots."

Program Specification

An assembly consisting of two planar rigid bodies in contact with each other and stationary ground.

You will write a program to determine if an assembly of planar rigid bodies, in frictional contact with each other, can remain standing in gravity (where gravity acts in the direction), or if the assembly must collapse. (See Example 12.11 and Figure 12.27 in Chapter 12.3 of the book.) An example assembly is shown in the image at right.

Your program will take as input:

  • a description of the static mass properties of each of the bodies: the location of the center of mass and the total mass (e.g., in kg); and
  • a description of the contacts. Each contact consists of a list of the two bodies involved in the contact (0 means stationary ground, 1 means body 1, 2 means body 2, etc.); the (x,y) location of the contact; the contact normal direction into the first body involved in the contact (this direction could be specified in degrees or radians, for example); and the friction coefficient at the contact. For example, in the image shown, the single contact between body 1 and body 2 could be specified as (1, 2, 60, 60, 3.1416, 0.5). This means the contact is between body 1 and 2, the contact location is at (60,60), the angle of the contact normal pointing into the first body in the list (body 1) is at pi radians, and the friction coefficient is 0.5. One of the contacts between body 0 (ground) and body 2 could be specified as (2, 0, 72, 0, 1.5708, 0.25), indicating that the contact normal into body 2 is at pi/2 radians and the friction coefficient is 0.25.

Ideally your input would be in an argument to the program function call, or in an easily edited external file that can be read by the program.

The output of your program will be binary: it is either possible or impossible for the assembly to remain standing. Your solution method is likely to use linear programming (linprog in MATLAB, LinearProgramming in Mathematica, or scipy.optimize.linprog in Python). If you find a solution to the contact vector (see Example 12.11) and standing is possible, then it is recommended that you also output . This represents one set of contact forces that would keep the assembly standing.

Unlike the form and force closure linear programming tests, where the elements of your contact vector had to be greater than or equal to a positive value, in this problem the elements of your contact vector only need to be nonnegative. (You are only trying to find one solution to the assembly equilibrium equations; in the form and force closure tests, you needed to show that the contacts could create arbitrary wrenches.)

Your biggest job in this programming assignment is taking the specifications of the bodies' mass properties and the contacts and turning them into static equilibrium equations of the form , similar to Example 12.11. These equations are solved by linear programming with the constraint that the elements of the contact vector must all be nonnegative. If you have bodies in the assembly, you will have wrench balance equations, and if you have contacts, you will have friction cone edges and therefore elements in your contact vector .

Testing Your Program

First test your program using the assembly shown in the image at the top of the page. First choose

You will test your program on two assemblies, one that can stand and one that must collapse. You may use the example on this page, where your only remaining freedoms are the choices of the masses of the bodies and the choices of the friction coefficients at the contacts. For one of your test assemblies, choose these so the assembly can remain standing. For your other test assembly, choose these so the assembly must collapse.

What to Submit

You will submit a single .zip file with the following contents:

  1. Your commented code in a directory called "code." Your code should be lightly commented, so it is clear to the reader what the code is doing. No need to go overboard, but keep in mind your reviewer may not be fluent in your programming language. Your code comments must include an example of how to use the code. You can write your program in any language, provided it is clearly structured, reasonably modular, easy to understand for a reader with no experience in your programming language, and with sufficient comments. Your program can span multiple files, or it can be a single file, if appropriate. If your code is in Mathematica, turn in (a) your .nb notebook file and (b) a .pdf printout of your code, so a reviewer can read your code without having to have the Mathematica software.
  2. A directory called "results". In this directory you should have drawings of the two assemblies you tested, with the masses, center of mass locations, contact locations, and contact friction coefficients clearly labeled for each assembly. You should also have an output log showing your program being called with each of these two assemblies as input and showing the resulting output of your program. You should also provide an explanation of the results. For the collapsing assembly, briefly give one reason the assembly cannot stand. For the assembly that can continue to stand, using your linear programming solution for , you can graphically draw the contact wrenches on each body and graphically show that they cancel the gravity wrench.
  3. (OPTIONAL) Use Figure 12.27 in the book, the three-body arch, as another test assembly. Choose reasonable guesses of the contact locations, assume all bodies are the same (same mass and location of the center of mass within the body), and assume the friction coefficient is the same at every contact. What is the minimum friction coefficient that keeps the assembly standing, according to your program?
  4. (OPTIONAL) A plain text file called "README.txt" or other explanatory file. This has any other information that may help the reviewer understand your submission.