DMS Consulting | sitemap | log in |
This is a free Spanglefish 1 website. | ||
Animating the JointsInventoryThe angles of the joints to make the robot walk have been calculated. AnimationAnimation is about what to move, how much to move it and how often. The routines supplied with Java3D are complicated to use but also limited in their application. The most important routine is Behavior. Behavior, in its most basic, is a routine waiting (sleeping) until a wakeup signal is received. A regular wakeup is required for animation and I use WakeupOnElapsedFrames. The simplest animation is wakup, move joint(s), sleep. The speed of the animation depends on how often you are woken up and how much you move the joint(s). The robot arm animation shown here involves moving three joints - the two shoulder joints and one of the elbow joints. Not a very difficult animation. QueueBehaviorQueueBehavior is a routine that allows you to allocate any number of animation queues and in each queue to add an animation routine. The animation routine in the queue contains information on when to start, the interval between each update and how long to run for. When finished, the animation is dequeued and the next routine starts. QueueBehavior also checks if an animation slot is missed and corrects for missed updates. There are also special animation routines, one to synchronise several queues, another to hold queues waiting for a trigger. These routine allow very complex animations to be created. The following animation shows these routines in actions. Links | ||