Home Projects Resume

PipeSnake Viz

Summary

This project ("Confined Space Mapping Module for In-Pipe Repair Robots", PL's: Howie Choset, Lu Li")was funded by the U.S. Department of Energy (DOE) Advanced Research Projects Agency - Energy (ARPA-E) REPAIR Program. It aimed to prevent dangerous pipe explosions by creating a robot that could traverse the inside of pipes while inspecting them and repairing any damages.

Responsibilities

Software Development
Computer Graphics
3D Mathematics

Picking the Tools

This was one of the first project teams I joined as a research intern at CMU in the summer of 2023. On top of helping build a pipe-traversing robot, I was tasked with developing a 3D visualization of the robot traversing pipe environments. I decided to code the project in Python since I had done similar work with the language before. I made use of the 3D mathematics and plotting libraries NumPy and Matplotlib to calculate and display the individual points that would make up my 3D models. I also used an Object Oriented Programming approach to structure my code.

Python NumPy Matplotlib

The First Draft

My first task was to create the model of the robot. I based its dimensions off actual measurements of the robot, then used some basic algebra and trigonometry to calculate the points I needed. The code for this was placed in a class titled Robot.

PipeSnake

I then moved into building the pipes. I wanted it to be customizable, as the viz would ideally be used for a variety of different pipe environments. Thus, I broke the implementation into 2 basic functions: one for modeling straight pipes, and one for turns. Users would call these functions of the Pipe class to create a model of their pipes. For the first draft, I managed to build the pipe along the x, y, and z axes in the positive and negative directions.

For example, say a user created a pipe that started going in the positive y direction, but then turned to the negative x (the robot marks the start of the pipe). The model would look something like this.

Turn 1

This wasn't bad for the first attempt, but it could be better. After a code review and discussions with my supervisor, senior members of the lab, and peers, I moved on to the next iteration.

The Final Product

For this next draft, I wanted to give the code functionality for modeling pipes going in diagonal directions, not just directions along a single axis. I also wanted to model wider and tighter turns of different angles for increased customizability. All in all, I had to redo my approaches, especially when it came to modeling turns.

To accomplish this, I needed to lean way more into mathematics. I built on my previous coursework in linear algebra fundamentals with further research into its computer graphics applications, then put some serious thought into how to use my newfound knowledge to calculate the points I would need. I also reached out to one of the best programmers in the lab who had given a lot of good advice during my aforementioned code review. After months of work, I managed to accomplish adding all these new features, on top of nearly halving the length of my original code.

Turn 1
Tight Turn Wide Turn

By the end of the summer, the code could model a much wider range of pipe configurations made up of turns and straight sections. I was very happy with what I had accomplished, and after showing my supervisor, he said the pipe modeling code would be used to generate 3D maps of pipes while the robot traversed them.

Feel free to check out the GitHub repository here!

Viz Final