2026-Group 2


Parallel park the red car
inside the green parking spot!

Parallel Parking Simulator

Project team member(s): Emma Ziegenbein, Hannah Lin, Amanda Weckerly, Zoe Moskowitz

Give a one-paragraph description/summary of the project, which includes information like the motivation for the project, the goals of the project, and the resulting implementation and success of the project.

Introduction

Explain the motivation for your project in terms of the educational objectives and why your haptic device is an appropriate approach.

Background

Explain the relevant prior work in the field of haptics and provide references. These will likely be different from the references in your project proposal. Make sure to do a thorough literature search on relevant haptic devices/application.

Methods

Provide a detailed description of your project, such that another student from the class could generally re-create your project/experiment from the report if necessary. (You don't need to document every screw, but the design should be clear.) Add images and videos as needed to support the description. You can refer to downloadable drawings and code in the "Files" section (later). You should divide this section into subsections, which can vary depending on your particular project. Here is an example set of subsections:

Hardware Design and Implementation

System Analysis and Control

Demonstration / Application

Results

Describe the results, which may include qualitative responses from users at the open house.

Future Work

Describe how your system could be tested (e.g., through experiments if you have not already done so), how it can be improved, and how it might be applied.

Acknowledgments

Here you can list any individuals or groups who helped you with your project. (e.g., another student in the class, a course assistant, or an especially helpful PRL TA). Optional, so delete this section if you aren't using it.

Files

Code and drawings should be linked here. You should be able to upload these using the Attach command. If you aren't willing to share these data on a public site, please discuss with the instructor. Also, in this section include a link to a file with a list of major components and their approximate costs.

References

List the referenced literature, websites, etc. here.


Appendix: Project Checkpoints

Checkpoint 1

For checkpoint 1 we had 4 main goals and they were as follows:

  1. Create a basic/rough draft of GUI
  2. Create a block diagram for controls analysis
  3. Determine our equations of motion for vehicle turning
  4. Implement vibration feedback for collisions

For goal 1, we met all our expectations and completed a first rough draft of the GUI. We completed the GUI using processing. It has a 1-lane road with oncoming traffic and the user is to park the red car in the green parking spot with no collisions.
See photo below for GUI.

For goal 2, we met all our expectations and completed a block diagram for the controls analysis. This block diagram is still a work in progress as we fine-tune the controls aspect of our project, but it gives us a good start.
See photo below for block diagram.

We also did a more in depth outline of how our system will run. Below is the overview. One of our key analysis will be developing the kinematic trajectory for a nominal parallel park, which, during the training level, will be the path which the car follows.

1. Project Goal and Nominal Path Definition

The goal is to develop a parallel parking simulator with haptic feedback.

  • Nominal Kinematic Path: The desired trajectory for a perfect parallel park will be calculated.
  • Corridor: A corridor will be applied around the nominal path to provide the user with flexibility in steering, allowing them to recover from initial errors.

2. Car State and Kinematics

The state of the car is calculated based on constant reverse velocity (v) and steering angle (δ) (from the wheel).

Kinematic Update

At each timestep (Δt):

x_k+1 = x_k + v cos(θ_k) Δt
y_k+1 = y_k + v sin(θ_k) Δt
θ_k+1 = θ_k + (v/L) tan(δ_k) Δt (where L is wheelbase)

System Steps

At each step, our system will perform the following sequence:

  1. Read encoder
  2. Propagate state
  3. Find nearest path point
  4. Compute errors
  5. Compute torque
  6. Send PWM

3. Ground Truth and Error Calculation

Ground Truth Data

The nominal parking path information will be collected using computer vision from a top-down video of a perfect parallel park.

Alternatively, the nominal path can be modeled using two circular arcs (one right, one left):

SegmentSteering
Reverse straight
Enter spotMax right
Rotate vehicleHold
CountersteerMax left
AlignStraighten

Error Definitions

After calculating the closest point projection, the system computes the following errors, which are used as the restoring force:

  • Lateral Error (E_y): Distance to path
  • Heading Error (E_θ): θ - θ_d (Current Heading - Desired Heading)

4. Haptic Feedback (Torque Output)

The haptic feedback provides a restoring force (τ) and follows the virtual corridor logic.

General Haptic Torque Formula

The haptic torque (τ) output is calculated using a feedback law:

τ = -k_y*E_y - k_θ*E_θ - b * dot(δ)

Piecewise Haptic Function (Lateral Error)

This is considered the cleanest first implementation.

Define:
  • e_y: Lateral error
  • e_safe: Warning threshold
  • e_max: Hard limit

The feedback torque (τ_fb) is defined as:

τ_fb = { 
  0 if |e_y| < e_safe; 
  k1(|e_y| - e_safe) if e_safe &le; |e_y| < e_max; 
  &tau;_max sgn(e_y) if |e_y| &ge; e_max 
}

Collision Avoidance

Collision avoidance is provided as a vibration output only when the car is about to hit something.

For goal 3, we came up with our equations of motion by modeling the car off of a bike. We ultimately decided to model the car off of a bike because it dramatically simplifies the dynamic equations compared to modeling off of 4 wheels. The wheelbase is the distance between the front and rear wheel axis, steering is the steering wheel angle (from the arduino), and theta is the angle of the car.
Our equations of motion are as follows:

For goal 4, we used our hapkit board and 2 vibration motors to implement collisions. We initially had a hard time getting our vibration motors to turn on. We connected the vibration motor to a transistor and had problems debugging our circuit. Eventually, we got it and our vibration motors turned on. Eventually we got them working and turns out our transistor was just backwards.

Checkpoint 2

Here you will write a few paragraphs about what you accomplished in the project so far. Include the checkpoint goals and describe which goals were met (and how), which were not (what were the challenges?), and any change of plans for the project based on what you learned. Include images and/or drawings where appropriate.

Example Video: https://www.youtube.com/watch?v=i_aLBql4Ufo