<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Hand Following example
In this notebook, you will use Pypot and an Inverse Kinematics toolbox to make Torso's hands follow each other.
Your Torso has two arms, and you can use simple methods to get and set the position of each hand.
Requirements
You will need a fully functionning torso, either IRL or in simulator (V-REP).
More info here.
The experiment
To be more precise, we will tell the right hand to keep a constant distance with the moving left hand, like on the picture above 
Step1:  Then, create your Pypot robot 
Step2:  Initialize your robot positions to 0 
Step3:  The left arm must be compliant (so you can move it), and the right arm must be active
Step5:  Following the left hand
To follow the left hand, the script will do the following steps 
Step6:  Now, do this repeatedly in a loop 
<ASSISTANT_TASK:>
Python Code:
import time
import numpy as np
from pypot.creatures import PoppyTorso
Explanation: Hand Following example
In this notebook, you will use Pypot and an Inverse Kinematics toolbox to make Torso's hands follow each other.
Your Torso has two arms, and you can use simple methods to get and set the position of each hand.
Requirements
You will need a fully functionning torso, either IRL or in simulator (V-REP).
More info here.
The experiment
To be more precise, we will tell the right hand to keep a constant distance with the moving left hand, like on the picture above : 
The left arm will be compliant, so you can move it and watch the right arm following it.
Setting up the robot
We begin by configuring the robot, to fit our needs for the experiment.
Begin with some useful imports :
End of explanation
poppy = PoppyTorso()
Explanation: Then, create your Pypot robot :
End of explanation
for m in poppy.motors:
    m.goto_position(0, 2)
Explanation: Initialize your robot positions to 0 :
End of explanation
# Left arm is compliant, right arm is active
for m in poppy.l_arm:
    m.compliant = False
for m in poppy.r_arm:
    m.compliant = False
# The torso itself must not be compliant
for m in poppy.torso:
    m.compliant = False
Explanation: The left arm must be compliant (so you can move it), and the right arm must be active
End of explanation
def follow_hand(poppy, delta):
    Tell the right hand to follow the left hand
    right_arm_position = poppy.l_arm_chain.end_effector + delta
    poppy.r_arm_chain.goto(right_arm_position, 0.5, wait=True)
Explanation: Following the left hand
To follow the left hand, the script will do the following steps : 
* Find the 3D position of the left hand, with Forward Kinematics
* Assign this position ( + a gap to avoid collision) as the target of the right hand
* Tell the right hand to reach this target
That's exactly what we do in the hand_follow function :
End of explanation
try:
    while True:
        follow_hand(poppy, target_delta)
        time.sleep(delay_time)
# Close properly the object when finished
except KeyboardInterrupt:
    poppy.close()
Explanation: Now, do this repeatedly in a loop :
End of explanation
<END_TASK>