NASA’s Perseverance Mars rover took a selfie with the Ingenuity helicopter, seen here about 13 feet (3.9 meters) from the rover in this image taken April 6, 2021, the 46th Martian day, or sol, of the mission by the WATSON (Wide Angle Topographic Sensor for Operations and eNgineering) camera on the SHERLOC (Scanning Habitable Environments with Raman and Luminescence for Organics and Chemicals) instrument, located at the end of the rover's long robotic arm.
Perseverance’s selfie with Ingenuity is made up of 62 individual images stitched together once they are sent back to Earth; they were taken in sequence while the rover was looking at the helicopter, then again while it was looking at the WATSON camera. The Curiosity rover takes similar selfies using a camera on its robotic arm. Videos explaining how the rovers take their selfies can be found here.