Difference between revisions of "Mike Grauer's Robot Project"
(Added final walking simulated robot)
|(2 intermediate revisions by one user not shown)|
|Line 1:||Line 1:|
[[Category:Bio-Inspired Robot Design (Fall 2006) Projects]]
[[Category:Bio-Inspired Robot Design (Fall 2006) Projects]]
|Line 88:||Line 90:|
Enjoy the simulated lurching.
Enjoy the simulated lurching.
Latest revision as of 00:54, 7 December 2006
Version 1.0 Manual Power
I started with the idea of making a 4 legged robot, as that seemed easier to stabilize and balance than a 2 legged creature, and a bit simpler than a 6 legged robot in that 4 legs are fewer than 6. This robot has a single axle down its center axis that powers 2 separate 24T gears, each of which is attached to an axle that powers front or rear legs. The legs are attached to the axle with another 24T gear, which allows for 4 different offset positions of the leg attachments, though in this version of the robot I didn't really play around with that. When I built this robot, the kit I was working with had no motors, so I couldn't really design around the motors, and subsequently when I saw the motors I realized that I'd have to change the design as there was no place to attach a motor. In my mind I had thought that a single motor could drive both gears, and as a result, both sets of legs, and that I would simply be able to swap in a motor for the manual turning of the central axle, but this didn't work out. Part of the problem was that the motor took up too much space on this robot and had to be pushed far out to the head/tail so that it could properly attach to the central axle (I'll start calling this the drivetrain from now on), and once I attached a motor at this position the weight of the motor threw the entire robot off balance. At this point I realized I needed a partial tear down and redesign.
Version 2.0 9V battery powered Lurch
I attached a single lego motor to the drivetrain, which meant I needed to first extend the length of my robot to accommodate the motor, and the motor's weight set the robot off balance. I extended the robot in the other direction (both extensions were along the central axis) and at first used what I planned to be an unpowered motor to balance the weight, but once I found out that the motors could be powered by a regular 9V battery I realized that I could just put the battery opposite the main drive motor and the weight of the battery would balance that of the motor. Now that the overall length and weight of the robot had been increased, the original legs were not up the the task of holding the robot. I set the legs on pegs that were attached to the 24T gears so that the legs were seated at a greater distance from the center of the robot, which gave the robot a wider base, and I also widened the feet to give a more stable platform overall. The robot actually walked in this configuration, though lurch is probably a more accurate description of its motion. Shawn had told me that in watching a dog walking he noticed that there was a progression of different legs contacting the ground, e.g. left front, right rear, right front, left rear, so I set my robot legs to be attached in such a configuration based on the 4 different pin positions available on the gears. The offset is reasonably well upheld on legs on the same axle, but the offset isn't that tightly maintained between the two axles, and even so, this smoothed out the motion enough for the robot to make noticable forwardish progress. I took video of the robot at this stage moving across a tabletop, the book behind it is for a frame of reference.
CAD model work
I am attempting to make a model of my robot using the Adams software, and have run through some of the tutorials that Rich P put into his project page. I have also explored importing step files into CAD, for which I created a page CAD_Info. There are many Lego parts modeled in CAD environments, but some of them are unlabeled, so I spent some time importing them into Adams and creating a map of part labels to parts.
I've spent quite a bit of time with Adams now, using some of the various tutorials that are posted around the wiki. My general pattern seems to be: start using Adams, make some progress (monitonically increasing with the number of times I use Adams), get to some point where my simulation no longer works and I cannot revert back to a working model and cannot figure out which pieces are breaking the model, get frustrated and leave.
For a while I was trying to import the CAD models of the Lego pieces, but Adams will convert STP and STL files to shells, which rids them of solid properties like mass, center of gravity, and watertightness (notions of inside and outside). Parasolid files can be imported as solids. After this experimentation with the Lego pieces, I decided to try building an abstraction of my robot in Adams using Adams's geometric primitives.
Here I have built a portion of my robot: the back is represented, as are revolute jointed legs and feet; however, I have only attached legs and feet to one side (left/right) of my robot. I'm having a lot of trouble getting objects oriented in the Z axis. All of my XY objects work fine, which is why I can set up legs on one side, but when I tried to setup legs on the other side of the back of the robot, I couldn't get the pieces alligned properly and then my simulations started breaking.
Here is a simulation of the 2 legged robot, note that there is rotational motion on the two hip joints, and there is a contact force between the feet and the ground block, but not between any other two components.
Here are some of the areas that I've had trouble with and the solutions:
1) making simulations and recording them--the set of steps to follow is not intuitive, but eventually with Rich's help I worked it out somewhat, then I showed Bill M, who improved on the process and described the solutions in his project page.
2) after rotating or changing the view I couldn't get back to the original view--Shawn P showed me this, through the View/Preset menu item, you can snap the view back to any orientation--front is the orientation that you probably started with.
3) convincing objects not to pass through each other--the way to do this is to apply a contact force to both objects
4) viewing certain objects once the model gets reasonably complex and messy--I have some instructions but they didn't work consistently--go to the Settings/Icons menu option, then leave the visibility of all model icons to on, and select the particular type of icons (forces for instance) that you want turned off, click visibility off and apply. To show the type of icon you should just have to click visibility on and apply, although this didn't work for me.
The two major areas that I would be really helped by would be placing objects in the Z plane (in 3D space in other words). I can get my primitives to behave well in 2D space, but then when I need to for instance attach left legs, which would go behind the right legs in the Z plane, I cannot get the objects to go where I want them to. Then when I try to simulate I get some fairly unhelpful error messages. This brings me to the second area I could be helped by--knowing how to debug a simulation and understand the error messages provided by Adams. Often I'm told that some particular part is what the problem is, but I'll have no idea where that part is or how to access it. Also, sometimes when I remove parts Adams will leave a marker in their place that breaks the simulation.
I thought I was going to give up on Adams and try to build my assembly in another CAD environment (likely Solidworks), but I went back to Adams one more time and made quite a bit of progress with some tips from Shawn Pierce. At this stage I have a robot that (kind of) walks, and is a reasonable facsimile of my robot in virtual space.
Here was the general strategy I used to build up my Adams simulation:
I started with the body (a rectangular box), and then oriented that in XY space (since I was trying to move things in 3 dimensions, it is easiest to move them in two dimensions from one view, then move to another view to move them in the third (or really 1 different and 1 similar) dimension), then shifted to a view from over the top, and oriented the box in Z space. I also created a long and wide plane underneath my robot that was connected to the ground and would allow contact forces between that plane and my robot. After situating the body of the robot, I added the hips, which in the Lego model are 24T gears, and in the Adams model is a square plate. I created 4 of these square plates, first orienting them in XY space, then finally in Z space. Another tip is that when you have groups of objects that need to be moved together, highlight them as a group and then the Vector move command will apply to all highlighted objects--this way if objects maintain a certain spacial relation (such as each gear/plate having a mate and staying at the same XY as the mate and at a certain Z depth from the mate) you can orient them relative to each other first and then move the group into your assembly. I added all four hips, front left, front right, rear left, and rear right to the body of the robot. Next to go were the legs, in my Adams simulation these were just long link bars. Again I created four of them, grouped them by two, and moved them to the appropriate places, with one leg per hip. The last physical pieces were the feet, which I modeled in Adams as boxes, and again set up with one foot per leg. As far as the connection between the hips and legs, to simulate my robot which has all of the legs offset from each other so that they will contact the ground in a distinct order, I made each of the legs in the Adams model connect to a different corner of the 4 cornered plate that represented the hip/gear.
After assembling the body parts and orienting them in space correctly relative to each other, I needed to add joints and motions, and to put the joints in the proper places I added geometric points. I created a geometric point using the point table (Excel like interface) and placed one point at the center of the join between one hip and the body. Once I had created one point, it was easy to create more points, as they differed usually only in one dimensional coordinate. I created 4 points between hips and body, 4 points between legs and hips, and 4 points between feet and legs. After creating the points I created revolute joints between the body parts at these different points. Finally I added motion to the joints between the hips and the body of the robot.
I then created contact forces between the plane on the ground and the feet of my robot, and ran a simulation. One problem that appears is that since the front feet are staggered in Y space from each other and from the rear feet, the right front foot is higher up than any of the other feet and the left front foot is lower down than any of the other feet, whereas the rear feet are only staggered in X space. Due to this and to the fact that I started my robot above the plane, when the simulation starts the robot first drops onto the plane, but does so in a very unbalanced manner due to the contact between left front foot and ground occuring before any other contact, and then the right front foot is very far from the ground so as the robot bounces to its right side, there is no foot on that side that can catch it quickly. The result of this is that the robot immediately starts tilting from side to side and eventually collapses. I tried to cheat and get around this by creating a wall close to the robot on its left side, which is why the robot appears in front of a white background--the idea being that as the robot fell into its unstable motion and started tilting from side to side, the wall would prevent it from falling over and give it a bit of stability. This worked to a certain extent, but only served to delay the time until the robot collapsed.
One inconsistency to note between the motion of the simulated and real robots is that I at first made the joints between the feet and the legs revolute, as my physical model is, but since the simulated robot starts out dropping, the feet in the simulate revolve around so that the wrong edge faces and contacts the ground. For now I got around this by changing the joints between the feet and the legs to fixed joints rather than revolute.
My animation uploaded here presents this simulation, with the wall to the left of the robot and with fixed joints between feet and legs. Something to note though, my original robot was fairly unstable and had a definite side to side lurch in its motion, so this simulation isn't too far off.
Here are some areas I want to change when I get a chance to do another simulation: 1) I'd like to shorten the body of the robot, I think the simulated robot has different proportions between leg distance and distance between hips compared to my Lego robot--and I think this shortened body length dimension may add some stability. 2) I'd also like to widen the feet, to stay more true to my Lego model, and again to add stability. 3) As far as staggering the hips, I think I can do that in the simulated robot in a smoother manner, having each of the hips a quarter revolution from each other, rather than in allignment as they are all now, this should decrease the distance from the ground to any one foot 4) Also to decrease ground to feet distance and prevent the bounce, I'd like to try to build the robot on the plane of the ground if I can.
Today I went back to the Adams lab and started a whole new model trying to implement the above ideas. I widened the feet, shortened the body, and decreased ground to feet distance. These all seemed somewhat successfuly, but then I also decreased the distance between the legs and tried to adjust the stagger of the leg/hip attachments, which weren't as successful. The robot takes a few steps, but then it seems the rear leg swings too far in front of the rear leg, and the robot's legs come out from under its center of gravity and the robot topples. Next I will try to increase the distance between the legs.
I realized that on my real robot, the joints between the legs and feet were fixed, so what I did in the simulation made more sense after I thought I hacked in, but in reality was how my robot works. Bottom line, fixed joints between legs and feet in real and virtual robots. Other changes I have made are to increase the distance between the legs on the same side of the body, slide the feet out 1cm from their attachment points on the legs, insert a cylinder between the hip gears and legs in the virtual model as in the real model, and add extrusions for the motor area at the rear of the robot and battery area at the front of the robot. Now I have a new robot simulation model that actually walks, and looks very similar to the way my real robot walks, both in the jerky left to right motion and the swinging up and down along the long axis of the robot. The only real difference between the two is that my simulated robot walks in a curve to the left for some reason. This could be because I didn't attach some joint or part feature symmetrically and this behaviour is the result.
Enjoy the simulated lurching.