From December 2024 to May 2025 I worked with BRACU Mongol-Tori’s autonomous sub-team. My part was the typing task: inverse kinematics for a two-degree-of-freedom arm, a lightweight vision unit, OCR and image processing for key identification, the URC 2025 dataset pipeline, and a GUI and simulation environment for testing and calibration.
Underwater vision had already made me think about whether a target was visible. This task added a more physical question: even after finding it, where does the end of the mechanism actually go? A correctly labelled F is not yet a coordinate the arm can use—and arriving above F is not yet pressing it.

What the competition actually asked
The distinction between autonomous navigation and autonomous typing matters. In the official 2025 equipment-servicing Q&A, teams could manually align with Q initially, without pressing it. After that alignment, typing had to proceed autonomously: no manual repositioning to the other keys. The keyboard itself could serve as the fiducial; a team could not place convenient markers beside it.
That is a more specific problem than “find any keyboard anywhere, with no human involvement.” It still leaves the difficult part: preserve a useful relationship between the camera, the key layout and the arm as the task progresses. The same Q&A says holding a key does not auto-repeat. Another occurrence needs a release and another press. Position, contact and sequencing are separate requirements.
From a box in an image to a key on the plane
I built the lightweight vision unit separately from the rover’s main computer. That separated the typing workload from the main computing arrangement; it was not a proof that contention or integration failures were impossible. Custom OCR and image processing handled key identification, and I managed the dataset pipeline for the 2025 task.
The detection image shows why identifying the keyboard alone is insufficient. Individual keys occupy different parts of a perspective-distorted plane. Function keys, letters and the space bar are different shapes. Neighbouring boxes can overlap, and a large printed character is not necessarily the centre of the surface that should be contacted. The values beside those boxes are detector confidence scores, not measured positional accuracy or a probability that the arm will press successfully.
A useful calibration separates three coordinate systems:
- Image pixels. A detected key provides a location in the camera image, with uncertainty from the box, viewing angle and identification.
- Keyboard coordinates. A planar mapping can rectify the view into a consistent layout. A homography needs enough independent correspondences; it does not magically provide scale in inches.
- Arm coordinates. The mechanism needs a metric target relative to its base, including the relationship between the camera and that base. Moving either invalidates assumptions in the mapping.
This is the reasoning behind the calibration GUI and simulation work. The preserved Arduino sketch starts at the third interface: it accepts X/Y values over Serial. It contains neither OCR nor the competition task sequencer. Treating that file as the complete autonomous typing system would hide most of the integration work.
The geometry inside my controller
The two planar links are 15.5 in and 14 in. Ignoring joint limits, their tip can reach an annulus: the outer radius is 29.5 in, and the inner hole has radius 1.5 in. A point inside the outer circle can still be unreachable because the links cannot fold short enough.
For a target at distance r, the law of cosines gives the relative elbow angle q2. The shoulder q1 follows by subtracting the triangle’s internal direction from the target direction. There are generally two geometric branches; this controller selects one. A real joint’s zero and direction are not necessarily the mathematical angle’s zero and direction.
The implementation uses atan2(y, -x), normalizes a negative direction into 0–360°, then applies offsets of −60° and +10°. Its command bounds are 30–135° for servo 1 and 10–135° for servo 2. Those bounds are applied independently, after the inverse calculation.
That ordering matters. Clamping an angle does not preserve the requested tip position. In this mapping, the allowed relative elbow angle is 0–125°, which alone raises the smallest nominal reachable radius to about 13.686 in. The shoulder bound also restricts which directions are reachable. The blue region in the instrument is the image of those command bounds—not the entire ideal annulus and not a measured physical workspace.
What the preserved sketch really does at the edges
The original function does not reject every unreachable request. For a target beyond the total link length, it requests a straight arm in that direction and returns. Later joint limits can change that direction further. For a point inside the inner hole, it still evaluates the inverse-cosine expressions. At the base, one expression also divides by zero. These cases can produce non-finite angles; they are not useful servo commands.
A short excerpt captures the distinction between requesting an angle and writing it:
// Constants in my archived sketch; lengths are inches.
const double len1 = 15.5, len2 = 14;
const int LIMIT1[] = {30, 135}, LIMIT2[] = {10, 135};
// After setIK(), constrain() and the smoothing step:
sg1.write(int(cAng1));
sg2.write(int(cAng2));
The smoothing moves each current command toward its target by 2° per loop, followed by a 15 ms delay. That is not a guaranteed update rate: computation and Serial parsing also take time, and reading an incomplete line can block. The two axes may finish at different times. A point-to-point position solution says nothing about whether the swept path clears the keyboard or surrounding structure.
Integer writes introduce a further difference even without a joint-limit violation. To make that visible, I compiled the original setIK function in a host-side numerical probe, then applied the source’s limits, integer conversion and nominal forward kinematics. These are computed positions assuming perfect realization of the commands, not measurements from the arm.
| Requested X/Y, in | Written servo angles | Nominal settled tip, in | Position miss |
|---|---|---|---|
| 21.4 / 13.8—the source’s starting target | 58° / 70° | 21.268 / 14.174 | 0.397 in |
| 10 / 10—geometrically reachable, command limited | 30° / 132° | 11.873 / 8.081 | 2.681 in |
| 40 / 0—beyond the link lengths | 120° / 10° | 29.500 / 0.000 | 10.500 in |
| 1 / 0—inside the inner hole | Non-finite inverse result | No valid pose | Not defined |
| 0 / 0—at the base | Non-finite inverse result | No valid pose | Not defined |
The starting target’s roughly 0.4 in nominal discrepancy is a consequence of this particular geometry and integer conversion. It is not an accuracy specification for the physical servos. Backlash, calibration, compliance and load would add their own effects.
Loading the diagram. It needs JavaScript; the text around it says the same thing in words.
Reaching is not pressing
Two joint variables position a tip in a plane. They do not independently specify an arbitrary 3D location and tool orientation. A typing mechanism still needs a consistent relationship to the keyboard surface, appropriate contact travel and a way to withdraw. Neither the diagram nor the two-servo archive models a contact force, key stroke or successful electrical input.
That makes the complete task a chain of checks rather than one inverse formula: identify the intended key, obtain a usable coordinate, reject or handle an infeasible request, move without an unwanted collision, make contact, release, and establish that the expected input occurred. Repeating a character requires that release/press transition; the official keyboard’s no-auto-repeat behavior makes the distinction explicit.
The lesson I take from this work is not that manipulation becomes easy once perception works. It is that each interface needs a meaning both sides can honour. A key label is not a coordinate. A coordinate is not a feasible joint command. A command is not a measured tip position. A tip position is not a completed keystroke.
The team result belongs to the team
BRAC University reported Mongol-Tori’s global top-10 finish at URC 2025, and published an innovation-award report about the team in October 2025. Those reports belong here alongside the engineering, rather than disappearing because they are news coverage.
They describe the team’s achievement across a rover programme. My contribution was the autonomous typing work described above—not the entire vehicle, its drive system or its science mission. The surviving sketch and detection frame make one part of that contribution inspectable; they do not establish a typing success rate at the competition.
Read the interfaces, not just the formula
Start with the 2025 task Q&A: it changes what “autonomous” means in this specific task. For the general mathematical treatment, Modern Robotics’ inverse-kinematics material separates a desired pose from the joint variables that can realize it.
For the perception side of my own work, Duburi is the longer history, and Half a second looks at the difference between an estimate and where the target actually is. Rupsha returns to ground vehicles with a different set of constraints. They share the same habit: keep the observations, model and physical claims distinguishable.