Skip to content

Commit

Permalink
submission README
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlynx19 committed Dec 26, 2024
1 parent 4636130 commit da028b3
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,26 @@ The file `trajectory_generation.py` generates a reference trajectory for the end

It consists of two functions: `TrajectoryGenerator` which generates the reference trajectory in 8 segments, indicated in the docstring at the beginning of the file, and a function `populate_configuration_list` is used to format the robot configuration to write it correctly to the csv file.

To run the file, call the function `TrajectoryGenerator` with the appropriate parameters which are already defined in the file. To generate the csv file use the function `np.savetxt` and save the variable `configuration_list` to the csv filename of your choice. By default, running the code will generate a csv file called `generated_trajectory.csv` which can then be used in CoppeliaSim to visualise the trajectory.

## Milestone1: youBot Kinematics Simulator
The file `kinematics.py` simulates the kinematics of the YouBot.

It consists of three functions: `odometry` which calculates the new chassis configuration using odometry equations, `limit_speeds` which clips the robot wheels and manipulator joint speeds within the specified limits, `NextState` which takes in the current configuration of the robot and outputs the next configuration after time dt.

## Milestone3: Feedforward Control
The file `feedforward_control.py` is used to perform feedback control of the mobile manipulator.

It consists of two functions: `BaseandArmSpeeds` which computes the wheel and joint speeds from the end effector twist, `FeedbackControl` which performs feedforward and PI control to output the commanded end effector twist

# Complete Program
There are three different files based on the specified task.

The file `simulation_best.py` runs the program with the best tuned Kp and Ki values.

The file `simulation_overshoot.py` runs the program with the overshoot Kp and Ki values.

The file `simulation_newTask.py` runs the program with the newTask Kp and Ki values.

All these file consist of a `main` function which simulates the entire task and returns a list of the robot configurations and the error variation over time. The function `plot_error` plots the 6 vector error using matplotlib. The robot configurations are saved in a csv file using `np.savetxt`.

All the robot parameters are defined in a file `robot_params.py`. The timestep for all simulations `dt` is 0.01

0 comments on commit da028b3

Please sign in to comment.