Warning
This page is located in archive. Go to the latest version of this course pages. Go the latest version of this page.

HW 2 - Operational control with iCub

The goal of this assignment is to create operational-space motions for iCub robot.

Code template You can start with this code
Maximum score 15
Soft deadline 2.4.2023 23:59:59
Hard deadline 6.4.2023 23:59:59

Task

During this assignment, you will follow up on your work with a Cartesian interface, which enables direct control of the arms in the operational space instead of commanding new configurations for the joints as you did in HW 1.

You will implement:

  1. Pick and place movement
    • In the beginning, the iCub has its hand in position S with a palm facing down.
    • The trajectory is (visualized in the figure):
      1. iCub moves his hand to A and then to B.
      2. Once B is reached, iCub starts closing the fingers.
      3. With the closed hand, iCub continues to A, C, and then to D.
      4. Once in D, the iCub opens his hand.
      5. With the opened hand, iCub goes back to C and then A.
    • The distance between positions A and C should be around 15 cm (black lines), and the distances between A and B (C and D) should be around 5 cm (blue lines). The distance between S and A is not specified. You can assume that position S is the home position of the robot. Nevertheless, it cannot be the same as any of A, B, C, or D.
  2. Letters writing
    • iCub will write four letters N, E, W, and T, each in one stroke with the index finger (other fingers are closed) with a return to a home (or another specified) position between letters.
    • You can take inspiration from the visualization.
    • This time, the hand is oriented in the way that the thumb is going upwards and the index finger points forward.
    • The letters will be written from the user's viewpoint (iCub will write the mirrored ones).
    • Letter height should be around 20 cm and width around 10 cm for N+E, 15 cm for T, and 22 cm for W.
  3. Both arms waving
    • iCub will be moving with both hands, similarly to HW 1, but in the operational space now.
    • The trajectory should create a curve, not a straight line ⇒ It should consist of several waypoints.
    • Arms should be synchronized (e.g., by mirrored targets for the hands).
    • You can block the torso joints and move with arm joints only.
    • You should find hands orientation similar to HW 1 but you can assume the hand orientation is fixed (no orientation sampling needed).
    • The smoothness of the waving will be evaluated. You can improve it by switching to the next waypoint before reaching the previous one.

Finally, you should allow the user to choose which movement will be shown. It will be implemented using RPC ports. The RPC port will respond to the command “help” with a list of all possible commands and their description (which command corresponds to which movement). The port will reply “ack” once the selected motion is finished.

You can start with the code from HW2 base. It is basically the Cartesian Interface tutorial with added headers for Joint Control (for fingers); with Cartesian Interface for both hands; and with possibility for switching between Gazebo and icubGUI visualization.

How to run: There is no smoke-test this time. But .XML scripts for yarpmanager are provided. You have two options for visualization:

  1. Gazebo (default) - run script hw2-system.xml
  2. icubGUI - if you have problems with performance, you can view the robot in icubGUI. Use hw2-system-gui.xml. Do not forget to also connect all ports

Feel free to use all the provided tutorials and examples in Humanoid Robot Programming.

If you have any questions, feel free to ask Jakub Rozlivek

Evaluation

Maximum number of points for each subtask is written in brackets.

  1. General [3 pts]
    • Response to commands from the RPC port [2 pts]
    • Working code - if you have at least 1 pt from motions [1 pt]
  2. Pick and place [4 pts]
    • Movements between 4 positions [2 pts]
    • Opening and closing fingers [2 pts]
  3. Letters [4 pts]
    • Each letter movement [4 x 1 pt]
  4. Waving [4 pts]
    • Prepared controllers for both arms [1 pt]
    • Basic synchronized movements [1 pt]
    • Smooth waving [2 pts]

Submission

Please, submit your solution to BRUTE. The points will be awarded after manual evaluation and code review. Solutions uploaded after the soft deadline will gain only half of the points. Solutions uploaded after the hard deadline will gain no points.

courses/hro/tutorials/hw/hw2.txt · Last modified: 2023/03/30 16:52 by rustlluk