BallFollowingDemo: Difference between revisions
(One intermediate revision by the same user not shown) | |||
Line 33: | Line 33: | ||
yarpview /viewer | yarpview /viewer | ||
4 - Run the module that converts coordinates between reference frames (left eye to root). | |||
4 - Run the module that controls the expressions | |||
as demo@cortex1: | |||
cd 0.icub_3D_ball_tracker | |||
./3.execute_trackerExpressions.sh | |||
5 - Run the module that converts coordinates between reference frames (left eye to root). | |||
as demo@cortex1: | as demo@cortex1: | ||
cd 0.icub_3D_ball_tracker | cd 0.icub_3D_ball_tracker | ||
./ | ./5.execute_LeftEyeToRoot.sh | ||
6 - Run the module that computes the inverse kinematics for the arm. | |||
as demo@cortex1: | as demo@cortex1: | ||
Line 45: | Line 52: | ||
./iKinArmCtrl --onlyXYZ | ./iKinArmCtrl --onlyXYZ | ||
7 - Connect all ports. CAREFUL: the robot should start moving after this step. | |||
as demo@cortex1: | as demo@cortex1: | ||
cd 0.icub_3D_ball_tracker | cd 0.icub_3D_ball_tracker | ||
./ | ./4.LEFT.iCub_connect_ports.sh | ||
./ | ./6.connect_LeftEyeToRoot.sh | ||
8 - OPTIONAL - Read the 3D position of the ball in the root reference frame | |||
as anybody@anywhere | as anybody@anywhere | ||
Line 80: | Line 87: | ||
as demo@cortex?: | as demo@cortex?: | ||
cd 0.icub_3D_ball_tracker | cd 0.icub_3D_ball_tracker | ||
./ | ./7.disconnect_all.sh | ||
1 - Kill all the processes of the demo | 1 - Kill all the processes of the demo |
Latest revision as of 16:54, 17 April 2009
Preliminaries
This demo uses the LEFT EYE and RIGHT ARM of the iCub, plus TWO CORTEX COMPUTERS. It needs the left eye to run at a resolution of 320x240.
You need to use two Cortex computers for this demo. We will use Cortex1 and Cortex2 in the wiki. The CPU's of Cortex2 will be fully loaded running the tracker, while those of Cortex1 will have a ~60% load.
If you need to stop the robot at any time, just press the red button.
Running the demo
0 - Turn on the iCub: cameras, iCubInterface, etc.
1 - Run the image rectifier.
as demo@cortex1: cd 0.icub_3D_ball_tracker ./0.LEFT_320x240_image_rectifier.sh
2 - Set the color parameters of the left camera and run the tracker.
as demo@cortex2: cd 0.icub_3D_ball_tracker ./1.LEFT320x240.iCub_set_parameters_of_framegrabber_REALISTIC.sh ./2.execute_the_tracker.sh
3 - Run a viewer. When the likelihood is high, the contour is red, otherwise it's green.
on the computer you're using for visualization (e.g. chico2): yarpview /viewer
4 - Run the module that controls the expressions
as demo@cortex1: cd 0.icub_3D_ball_tracker ./3.execute_trackerExpressions.sh
5 - Run the module that converts coordinates between reference frames (left eye to root).
as demo@cortex1: cd 0.icub_3D_ball_tracker ./5.execute_LeftEyeToRoot.sh
6 - Run the module that computes the inverse kinematics for the arm.
as demo@cortex1: cd iCub/bin ./iKinArmCtrl --onlyXYZ
7 - Connect all ports. CAREFUL: the robot should start moving after this step.
as demo@cortex1: cd 0.icub_3D_ball_tracker ./4.LEFT.iCub_connect_ports.sh ./6.connect_LeftEyeToRoot.sh
8 - OPTIONAL - Read the 3D position of the ball in the root reference frame
as anybody@anywhere yarp read ... /icub/LeftEyeToRoot/ballPositionOut
Putting the demo on hold
So you have the demo running and you want to "pause" it for a while and then get it back working. You can do this easily by disconnecting two ports and then connecting them again. This will only stop the positions from being sent to the inverse kinematics module (and thus, almost always, it will stop the robot), the rest of the processes (e.g. the tracker) will keep running.
0. Pause
as anybody@anywhere yarp disconnect /icub/LeftEyeToRoot/ballPositionOut /iKinArmCtrl/right_arm/xd:i
1. Resume
as anybody@anywhere yarp connect /icub/LeftEyeToRoot/ballPositionOut /iKinArmCtrl/right_arm/xd:i
Quitting the demo
0 - Disconnect all the ports. THIS WILL STOP THE ROBOT.
as demo@cortex?: cd 0.icub_3D_ball_tracker ./7.disconnect_all.sh
1 - Kill all the processes of the demo
you can quit the various processes of this demo in any order.
Back to the main page for Chico: Chico.