Early in my doctoral studies, I spent time working with soft robotics. My favorite part was fabricating and controlling soft pneumatic actuators that were fabricated using 3D printing or silicon molding. I applied some simple computer vision techniques to provide some not-so-intuitive control of the curvature of the actuator while helping one of my lab mates. It wasn't perfect, but it was definitely fun and a good learning experience. I even derived a formula to calculate the curvature of a circle given a length and two points to approximate the curvature of the actuator. That and the computer vision feedback system helped the lab mate implement a genetic algorithm to learn optimal PID gains to control the actuator to follow time-varying curvature reverence trajectories. Below are videos of the initial trials of controlling the actuator curvature using mouse clicks. The idea was that you needed to click on a reachable point for the actuator tip. Then the computer would calculate a curvature value for the actuator tip to reach it. This was not the best approach but was fine for testing the feedback. For the curious, the derivation for the formula for curvature is below the videos.
To calculate the curvature of the soft robotic manipulators, we put markers at the base and tip of the soft actuator and I used OpenCV to track the 2D positions of each one. Given, those two points and the length of the actuator, I needed to estimate the curvature. I assumed that the actuator had uniform curvature and wouldn't change length when inflated which basically meant that I used the length of the actuator as the arc length of the actuator when it was bending and could calculate the curvature by assuming that the actuator overlaps an imaginary circle with a radius R. For a circle, the curvature is just the inverse of its radius which could be found using the arc length formula. Using the trig identity above Figure 2, the angle theta can be expressed as a function of the distances d1 (the distance between the vertical coordinates of the two markers) and d2 (the distance between the markers) in Figures 1 and 2. From theta and the arc length, radius and curvature are straightforward to calculate.
