Department: FTI-FHO-FPT Presenter: Pham Van Trung INTRODUCTION TO MOTION GENERATION FOR NAO ROBOT USING ANDROID FRAMEWORK Department: FTI-FHO-FPT Presenter: Pham Van Trung
Motor Stiffness Control OUTLINE 1 Introduction 2 Motor Stiffness Control Joint Angle Control 3 4 Position Control 5 Locomotion Control 6 Question and Comment
Introduction Robot Models
Introduction Humanoid robot Have human model Capable to perform as human
Introduction NAO Humanoid Robot
Introduction Motions of NAO Robot How to move an arm or a leg to a position? Forward kinematic Inverse kinematic How to locate a position of the robot?
Introduction NAO Motion Module on Android Framework Control Stiffness of Joint Motor Control Joint Angle Control Effector Position in Cartesian Coordinate Locomotion control
Stiffness Control What is stiffness? Basically, stiffness is a torque that a motor of joint can generate Stiffness value relatively defined 0.0 to 1.0 Functions to control and manage stiffness Globally, on the whole robot using: RobotMotionStiffnessController. wakeUp (Robot robot) RobotMotionStiffnessController. rest (Robot robot) Specifically, for one or several joint(s) using: RobotMotionStiffnessController. stiffnessInterpolation (Robot robot, String[] names, float[] stiffnesses, float[] times) float[] RobotMotionStiffnessController. getStiffnesses (Robot robot, String name ) RobotMotionStiffnessController. setStiffnesses (Robot robot, String[] names, float[] stiffnesses)
Stiffness Control Example Using setStiffnesses() names – Name or names of joints or chains: “Body”, “JointActuators”, “Joints” or “Actuators”: HeadYaw, LShoulderPitch, LHipYawPitch, RHipYawPitch, RShoulderPitch, HeadPitch, LShoulderRoll, LHipRoll, RHipRoll, RShoulderRoll, LElbowYaw, LHipPitch, RHipPitch, RElbowYaw, LElbowRoll, LKneePitch, RKneePitch, RElbowRoll,LWristYaw, LAnklePitch, RAnklePitch, RWristYaw, LHand, RAnkleRoll, LAnkleRoll, RHand. Stiffnesses, stiffnessLists, – An stiffness, list of stiffnesses or list of list of stiffnesses. Range of stiffness value is within [0.0,1.0];
Joint Control What is joint control? Functions to control joint angles Rotate a joint motor by a exact given angle Forward kinematic control Functions to control joint angles Animation methods (time fixed, blocking function RobotMotionJointController. angleInterpolation (Robot robot, String[] names, float[] angles, float[] times, boolean isAbsolute) RobotMotionJointController. angleInterpolationWithSpeed (Robot robot,String[] names, float[] angles, float fractionMaxSpeed) Reactive methods (could be changed every ALMotion cycle, non blocking function) RobotMotionJointController. setAngles (Robot robot, String[] names, float[] angles, float fractionMaxSpeed) RobotMotionJointController. changeAngles (Robot robot, String[] names, float[] angles, float fractionMaxSpeed) RobotMotionJointController. closeHand (Robot robot, String hand) RobotMotionJointController. openHand (Robot robot, String hand)
Joint Control Example Using angleInterpolation () names – Name or names of joints, chains as mentioned in the section 1. angles – An angle, list of angles or list of list of angles in radians that will be varied. Range of angle variation is within [-3.14,+3.14] depending on an allowable range of a chosen joint. See more about joint of hardware specification. times – A time, list of times or list of list of times in seconds. It must be greater than zero. isAbsolute – If true, the movement is described in absolute angles in the default defined coordinate , else the angles are relative to the current angle.
Cartesian Control What is Cartesian control? Functions Move an effector (chain of joints) to a given position in a Cartesian coordinate Dealing with inverse kinematic problem Functions Animation methods (time fixed, blocking function RobotMotionCartesianController. positionInterpolation (Robot robot, String name, int space, RobotPosition6D[] positionList, int axisMask, float[] durationList, boolean isAbsolute) RobotMotionCartesianController. positionInterpolations (Robot robot, String[] names, int spaceForAll, RobotPosition6D[] positionList, int[] axisMaskList, float[] durationList, boolean isAbsolute) Reactive methods (could be changed every ALMotion cycle, non blocking function) RobotMotionCartesianController. setPosition (Robot robot, String name, int space, RobotPosition6D position, int axisMask, float fractionMaxSpeed) RobotMotionCartesianController. changePosition (Robot robot, String name, int space, RobotPosition6D positionChange, int axisMask, float fractionMaxSpeed)
Cartesian Control Example Using positionInterpolation () Name – Name of the chain. Could be: “Head”, “LArm”, “RArm”, “LLeg”, “RLeg”. space – Task space {FRAME_TORSO = 0, FRAME_WORLD = 1, FRAME_ROBOT = 2}. positionList – Vector of 6D position arrays (x,y,z,wx,wy,wz) in meters and radians. axisMask – Axis mask. True for axes that you wish to control. e.g. 7 for position only, 56 for rotation only and 63 for both. durationList – Vector of times in seconds corresponding to the path points. isAbsolute – If true, the movement is absolute else relative. Robot – is a connected robot. This variable is retrieved by calling the function Robot. getRobot().
Locomotion Control What is Locomotion control? Move a robot in local place Functions to manage walking RobotMotionLocomotionController. moveTo (Robot robot, RobotMoveTargetPosition target) RobotMotionLocomotionController. setWalkTargetVelocity (Robot robot, RobotMoveTargetPosition target, float speed) RobotMotionLocomotionController. moveIsActive() RobotMotionLocomotionController. stopMove() RobotMotionLocomotionController. getRobotPosition (const bool& useSensors) RobotMotionLocomotionController. getNextRobotPosition() RobotMotionLocomotionController. getRobotVelocity()
Locomotion Control Examples SetWalkwithVelocity() MoveTo() x – Fraction of MaxStepX. Use negative for backwards. [- 1.0 to 1.0] y – Fraction of MaxStepY. Use negative for right. [-1.0 to 1.0] theta – Fraction of MaxStepTheta. Use negative for clockwise [-1.0 to 1.0] Frequency – Fraction of MaxStepFrequency [0.0 to 1.0] MoveTo() x – Distance along the X axis in meters. y – Distance along the Y axis in meters. theta – Rotation around the Z axis in radians [-3.1415 to 3.1415].
Questions and Comments Thank for Your Attention