For you and I, taking a selfie is quick and simple - just point the cell phone's camera our way and snap the pic. But how did NASA's Mars rovers like Perseverance and Curiosity do it? It took about a dozen experts, a week to plot the commands, and 62 images for the rover to make it happen.
From NASA:
Like the Curiosity rover (this black-and-white video from March 2020 show how it takes a selfie), Perseverance has a rotating turret at the end of its robotic arm. Along with other science instruments, the turret includes the WATSON camera, which stays focused on the rover during selfies while being angled to capture a part of the scene. The arm acts like a selfie stick, remaining just out of frame in the final product.
Commanding Perseverance to film its selfie stick in action is much more challenging than with Curiosity. Where Curiosity’s turret measures 22 inches (55 centimeters) across, Perseverance’s turret is much bigger, measuring 30 inches (75 centimeters) across. That’s like waving something the diameter of a road bike wheel just centimeters in front of Perseverance’s mast, the “head” of the rover.
JPL created software to ensure the arm doesn’t collide with the rover. Each time a collision is detected in simulations on Earth, the engineering team adjusts the arm trajectory; the process repeats dozens of times to confirm the arm motion is safe. The final command sequence gets the robotic arm “as close as we could get to the rover’s body without touching it,” Verma said.