Download presentation
Presentation is loading. Please wait.
Published byMaud Elliott Modified over 9 years ago
1
3D Biped Simulation Chris Atkeson, 4/10/09
2
Top level directories hum1/hum1: where the interesting stuff is hum1/useful: useful code hum1/lib: Windows directories for compiled graphics library
3
Other software used We use SDFAST rigid body dynamics We use graphics from ODE, but not dynamics. drawstuff.dll, etc. Mrdplot to plot data.
4
hum1/hum1/ Simulation and display separate. simulation.c: main program for simulation. animate.c: main program for display. Use Makefile to compile on Linux, Mac OSX Use xxx.vcproj to compile on Windows
5
Other code components controller.c: walking policy. Other controller files are working versions for particular behaviors data.c: saving data in mrdplot format. dynamics.c: dynamics using spring/damper ground model. Interface to sdfast code in sdfast/ main.h: main include file. main2.h: function declarations matrix3.c 3x3 matrix code matrix3.h include file for 3x3 matrix code parameters.c: handle simulation parameters.
6
Useful variables (main.h) See main.h root_position: position of pelvis root_q: orientation of pelvis (quaternion) root_velocity: velocity of pelvis root_w: angular velocity of pelvis joints: joint angles jointsd: joint angular velocities controls: control signals xxxd: velocity xxx_d: desired value xxx_true: true values of above (do not use)
7
dynamics.c: interface init_dynamics( s ); init_state_two_feet_on_ground( s ); integrate_one_time_step( s );
8
Ground contact model Z > 0 -> no force Fz = kz * z + bz * zd Fx = kx * (x – x0) + bx * xd; Fy = … Mz = ka * (a – a0) + ba * ad Fz Fz, Fx, Fy, Mz = 0, reset x0, y0, a0 Friction cone violation -> Fx, Fy, Mz = 0, reset x0, y0, a0
9
Marching in place controller
10
What is controlled? Simple Harmonic Oscillator: + * E ≈ k*p 2 + m*v 2 Physics does not match reality, empirically ok Inverted pendulum: - * - E ≈ mgh + Iω 2; h max = E/mg Hard to define h (leg length varies, joint moves), sensitive to h (cosine effect) Constant height: - * - F/mg = tan(θ) = x/z; -∫Fdx = m*v 2 /2 x min = sqrt( x 2 – z*v 2 /g )
11
Inverted Pendulum and Constant Height Models F
12
Joint Control (xAA) AA = abduction/adduction AAA (ankle roll) are pure torque sources. HAA (hip roll) are torque sources in double support. In single support, HAA need to hold torso up (PD with FF). Desired position tracks AAA. xAA double support torques constant or depend on velocity error. Zero torque works. AAA single support torques are constant or depend on x_min error. Zero torque works.
13
Joint Control (xFE) FE = flex/extend xFE are PD, with desired trajectories Liftoff occurs when x_min < x_min_d Touchdown occurs a fixed time interval after turnaround
14
Controller States WAITING 1 DS1 2 // double support, left leg in front LIFTOFF1 3 // double support, lifting right leg SSL1 4 // first phase of single support, left leg in stance SSL2 5 // second phase of single support, left leg in stance DS2 6 // double support, right leg in front LIFTOFF2 7 // double support, lifting left leg SSR1 8 // first phase of single support, right leg in stance SSR2 9 // second phase of single support, right leg in stance LAUNCH1 10 // launch state. Squat LAUNCH2 11 // launch state. Like DS1.
15
reinit_controller( SIM *s ) run_trajectory( SIM *s, double time ) run_servos( SIM *s ) run_state_machine( SIM *s ) controller( SIM *s )
16
Hacks Point feet: Feet always assumed to be horizontal.
17
Floor geometry Delay, low pass filter (channel specific) Actuator dynamics Unmodelled dynamics, other coupling dynamics Different ground contact model, friction
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.