HW2 - Smooth Movements

The goal of this homework is to perform smooth movements with the arms of the robot. The robot should be able to move in a straight line or a circle with a smooth trajectory. In other words, the movement should be continuous and without jerks.

BRUTE will use its config file, where the GUI is disabled.

Code template hw2.zip
Maximum score 13
Deadline 31.3.2024 23:59:59

You will lose 2 points every 24 hours after deadline.

How to use the code template

  • insert config hw2.yaml to your icub_pybullet/configs directory
    • BRUTE will use exactly this config. However, for local testing it is worth to enable GUI
  • insert your code to move() function in hw2.py
    • do not rename the function
    • do not change parameters of the function
    • you can use other functions inside, but move(client,…) will be called by the evaluation system
      • the variable client (instance of icub_pybullet/pycub.py) will be created by the evaluation system. Do not create a new instance of the client inside the function
  • hw2.py should be by default in icub_pybullet/folder/another_folder. You can always change the addition to path in the header of the file or add icub_pybullet to your python path and then it can be anywhere

Scoring

  • BRUTE will give you 16 random trajectories to perform. Each trajectory will be awarded with 0.5 points → 8 points in total
  • the smoothness of the movements will be checked by hand by the teacher and awarded with a maximum of 2 points
  • the code should be as general as possible to work for any allowed input. Meaning that it should not be, for example, a long if/else (switch) statement for each axis etc. On top of that, the quality of code will be also checked. Maximum of 3 points will be awarded for this criterion
  • In total: 8 + 2 + 3 = 13 points
  • The maximal runtime of BRUTE evaluation is set to 10minutes. It should be enough. But take into consideration that it will probably take more than 5 minutes to evaluate the code.

Evaluation

  • both circle and line movements will be evaluated with three sub-criteria:
    • circle:
      • standard deviation of each point of the circle to center; must be < r*0.125
      • difference between expected and real radius; must be < r*0.1
      • mean distance of all points from the expected plane; must be < 0.1
    • line:
      • difference from real length to expected length; must be < 0.0075
      • angle between the expected and real line; must be <0.1
      • mean distance of all points from the expected line; must be < 0.01
  • points will be awarded if all the sub-criteria are met
  • BRUTE also shows image of your trajectory (black) vs expected trajectory (blue). It may not be always 100% correct.

Possible inputs

  • action: string, either “line” or “circle”
  • axis: list of ints. For “circle” it the length is always 1. For “line” the length can be from 1-3. Individual numbers on the list are axes along which the robot should move. For example, [0, 1] means that the robot should move in x- and y-axis.
  • r: list of floats. The same length as axis. Number in metres. For “circle” it is the radius of the circle. For “line” it is the length of the line in the given axis.
  • Examples:
    • action=“circle”, axis=[0], r=[0.01] - the end-effector should move in a circle around the x-axis with a radius of 0.01m
    • action=“line”, axis=[1], r=[-0.05] - the end-effector should follow a line in the y-axis with a distance of -0.05m
    • action=“line”, axis=[0, 1], r=[0.05, -0.05] - the end-effector should follow a line in the x-axis for 0.05cm and y-axis for -0.05m
      • it should be simultaneous movement in both axes, i.e., it will be one line
  • The movements can be anywhere in space. E.g., when you should do a circle around X-axis, it can be anywhere in the space around an axis that is parallel to the world X-axis

Requirements

  • when you start performing the trajectory, you HAVE TO set client.start_pose to the starting pose of the trajectory
    • this is to ensure that the evaluation system only compares the actual trajectory, e.g., without the movement to the starting position
  • do not turn off the gravity
courses/hro/tutorials/hw/hw2.txt · Last modified: 2024/03/12 15:31 by rustlluk