Light Mode Image

Robotic Arm Simulation

A simulation that plots all possible reachable points for a robotics arm.

Arm Simulation Cover Page

Timeline

August 2023 – September 2023

Implementation Details

Programming Language: Python.

Libraries: PyBullet, Ikpy, Matplotlib, and NumPy.

Associated with: TrickFire Robotics

Link to GitHub repository: Robotics Arm Workspace Simulation

Overview

The current arm for our rover weighs a lot, which makes the rover overweight according to the URC competition rule. So, we aimed to redesign and optimize the arm.

To do this, we need to figure out the possible reachable points for the arm, this is called the arm's “workspace”. The mechanical team will then use this data to come up with the best possible re-design for the arm.

Goals

Planning

I picked up the code from a previous team member who already graduated. However, the original code used a controller to move the model of the arm to the target position, so I needed to refactor the code and write my own logic for the arm to automatically reach every possible position it can reach in space and plot that into a graph.

Tasks Checklist:

Research:

Select libraries:

Class Design (Description)

- Class Graph: Display a 3D graph of all reachable points with the input figure and scatter points.

- Class EndEffectorSim: run the simulation. Each joint has a certain joint limit defined in the .urdf file. Based on that, permutation is used to generate a list of all possible joint positions (given a certain precision). Then, forward kinematics is used to calculate the end effector position.

Note:

Depending on the input precision, the distance between points would be sparse or dense. For example, for a joint limit between 0 and pi radian, if the precision is 3, 3 points will be generated inclusively (e.g. 0, 0.5 pi, and pi). Of course, the more precision, the better. But since joints' position need to be in a specific order, permutation is used. Thus, more precision = slower run time.

Outcomes

There are 2 modes:

Real-Time Simulation:

A note on precision:

Depending on how "precise" or "close" you want your points to be. But more points don't always mean better visualization. Increasing the precision slows calculation time since possible configurations are calculated using permutation. Additionally, too high precision can cluster your 3D graph.

For each graph below, notice that less precision = less dense. But the reachable points are sparse and it is difficult to visualize the reachable positions. Since the alpha of each scatter point is set to 0.1, the transparency of a point indicates the frequency of that point being reached. A solid point means that it has been reached multiple times. Likewise, an almost-transparent point shows that the arm only reaches it once or twice.

Project Arm Plot 1

Example of a precision = 3 plot

Project Arm Plot 2

Example of a precision = 4 plot

Project Arm Plot 3

Example of a precision = 5 plot

Project Arm Plot 4

Example of a precision = 6 plot

Next Project →