Werkr Tractors

Software Engineer, Co-op to Full-time · Jan 2024 – Present · Waterloo, Ontario, Canada

  • Software Engineer (Full-time), May 2026 – Present
  • Software Engineer Co-op, May – Aug 2025
  • Robotics / Software Engineer Co-op, Jan – Apr 2024

C++ · ROS2 · Qt · Python · Autonomous Navigation · Sensor Fusion

I joined Werkr Tractors as a software engineering co-op and stayed on full-time, working on the software for a fully electric, autonomous tractor built for small-scale precision agriculture. Most of my work is on the tractor's high-precision guidance: writing the C++ ROS2 nodes that let it follow GPS-defined rows with high positional accuracy, in open fields and under tree cover alike.

Supporting that, I tuned the Extended Kalman Filter that fuses GPS, heading, and other sensor data into the position estimate the guidance relies on, building Python tooling to analyze logged rosbag data offline so issues can be traced to the exact moment they occur. I also develop the onboard Qt operator interface used to drive, monitor, and switch the tractor between manual and autonomous operation.

Tractor Guidance

Architecture: The guidance system turns a mission planned in the operator interface (GPS-defined rows, headland turns, and implement events) into steering and speed commands. I designed it as a set of C++ ROS2 lifecycle nodes: a mission manager that owns the state machine and tracks progress, a trajectory planner that builds a short, speed-profiled trajectory ahead of the tractor, and a path tracker that follows it with a modified Stanley controller, using curvature feedforward to compensate for steering lag.

Obstacles: Obstacles are mapped into a Nav2 costmap with custom layers. When one blocks the path, the tractor detours around it with Nav2's Smac Hybrid planner, staying within the allowed deviation from the row, or stops if no detour exists, with Nav2's collision monitor as an independent safety backstop.

Testing: All core logic lives in ROS-independent, unit-tested classes and is tested in simulation.

Optimizing Position Estimation

Problem: This progression shows how I tuned the Extended Kalman Filter (EKF) that estimates the tractor's position and heading. The tractor has to hold a straight line within a small error margin, in open fields and under tree cover where GPS quality varies, so the guidance can only be as good as the estimate it is given.

Approach: To find where the filter was going wrong, I wrote a Python tool that parses logged rosbag data offline and plots covariance and heading error over time, showing exactly when and how the estimate diverged. With it, I found and fixed three issues:

  • GPS confidence: the GPS was overreporting its confidence, so I rescaled its covariance to a realistic value
  • Heading weighting: the filter over-trusted the differential GPS heading, which made the output zig-zag, so I adjusted the relative weighting
  • RTK transitions: the yaw estimate was too volatile during RTK float-to-fixed transitions, so I damped it

Result: Each fix shows up in the plots as a visible drop in error over time.

Onboard Operator Interface

Interface: The screenshot shows the second iteration of the user interface, built in Qt and connected to ROS2. It has two main jobs: letting the user generate missions with different path types, and giving feedback about the state of the tractor and the mission.

Mission types: Currently there are 5 supported mission types:

  • AB Line (straight line from A to B)
  • AB Multi Line (set of straight lines connected optimally)
  • Repeated Line (drives lines parallel to an initial line)
  • Area Fill (cover every part of an area such as for mowing)
  • Driving Path (drive a path that was recorded manually)

Path planning: For each mission type, the path generator calculates the optimal order to drive the rows in, plans the route to avoid conflicts with a pre-defined boundary, plans implement moves, and calculates a path modified from a Dubins or Reeds–Shepp path to smooth out steering inputs and approach gear changes with straight steering, so that the tractor never has to steer at a standstill.

Gallery

  • Tractor V1
  • New Tractor
  • Autonomous Seeding
  • EKF Tuning Plot