You are provided with the 3-links planar manipulator shown in the sketch below, whose link lengths ℓ1, ℓ2, ℓ3 are all equal and whose tip 𝐸 is identified by the triplet [xe, ye, φe], being (xe, ye) the Cartesian coordinates of the tip, whereas φe is the angle between the link 3 and the x-axis of the root frame.
Moreover, the manipulator is actuated by means of 3 motors controlled in velocity that move the joints angles [θ1, θ2, θ3].
Design a controller by filling in the missing code in the src/main.cpp
module, which implements a suitable Inverse Kinematics algorithm to meet
the following requirements given in descending order of importance:
- 1️⃣ Primary task: reach the target position with the tip of the manipulator.
- 2️⃣ Secondary task: align the tip frame along with the target frame.
👉 The test will verify the capabilities of your controller in different conditions, assigning scores according to the recorded performance, considering in particular cases where the primary and secondary tasks cannot be achieved at the same time or even cannot be fully completed.
An example of a successful control is visible in the animation below:
While running the script test.sh in the smoke-test directory, you might find helpful resorting to the yarplogger
utility to catch all the printouts produced through yDebug
, yWarning
, yInfo
and the like. Thus, do the following:
- Make sure that
yarpserver
is running. - Launch the
yarplogger
. - Launch the smoke test.