Tuesday, December 14, 2010

How We Drive the Rovers

I almost always start public talks with this information, and I get asked this enough on Twitter and the like that I might as well blogificate it.

So here's how we do that.

Damn The Speed of Light

We'd like to drive the rovers with a joystick. Push forward on the joystick and the rover goes; let go, and it stops. But we can't do that because Earth and Mars are too far apart. The closest they ever get, when both planets are on the same side of the sun, is nearly four light-minutes apart. When on opposite sides of the sun, that rises to about 20 minutes. And since signals travel between Earth and Mars at the speed of light, that imposes a two-way time delay on any driving.

Imagine trying to back your car out of the driveway with merely a four-minute one-way time delay. You turn around, look out the back window, and hit the gas -- and then nothing happens. For four minutes. Then your car starts to move, but you don't know it for another four minutes, until the windshield starts updating. Good luck with that.

(For younger kids and early teens, I sometimes use this analogy. You're playing a video game, and you hit fire. Your guy doesn't fire for four minutes. Plus, you don't know he fired for another four minutes. How well are you gonna score?)

In our case, by the time we see the cliff coming (as Andy Mishkin says), we've already gone over it. So we don't do that.

How We Do It

Instead, we take advantage of the fact that our solar-powered rovers have to shut down for the Martian night anyway. Late in the Martian afternoon, they have a communication pass where they send us back pictures and other data telling us what they did for the day. Then the sun goes down and they go to sleep.

That's when I go to work. We take those pictures and other data and turn it into a 3-D model of the world around the rovers, like in a video game. And we put a software model of the rovers down in that world and start sending it commands. The software model understands the same commands that the real one does, so -- ignoring such things as the effects of the terrain, which can be tricky, especially on slopes or in soft soil -- it does more or less what the real one will do. We can interact with this software model in very nearly real time, so there's our joystick.

We also send a bunch of commands to detect and handle off-nominal situations, which is where the real art of the job is. What tilts should the rover expect today? What pitch and roll? How far do we expect the suspension to articulate? And what should we do if something happens that we don't expect?

When we get the simulated rover doing what we want the real one to do, we review all of the commands that made it do it -- twice. And if we still can't find anything wrong with them, we send them up to the real rover.

Then we go home and go to sleep, and soon the sun comes up in the Martian sky. We send our rover her commands for the day, and over the course of the next several hours she carries them out -- and if it's a good day, she does what we wanted -- and then the sun starts to go down in the Martian sky, and the cycle repeats.

We call this, incidentally, the daily tactical cycle of operations. There are other processes going on, too -- strategic ones, which aren't tied directly to the Martian day cycle in the same way -- but tactical is where the fun is.

A Side Note About Mars Time

We used to literally work the Martian night shift -- we lived on Mars time for the first three months of the mission. Because the Martian day is 40 minutes longer than the Earth day, this screwed your schedule up good. You come into work at 8:00 one day, then at 8:40 the next day, then at 9:20, then 10:00, and pretty soon you're coming in to work at 2 or 3 in the morning. This was awesome, but I was nearly the only one who thought so.

But I thought so, and with several good reasons. First, it emphasized the uniqueness, the specialness of what we were doing. Who else lives and works on the schedule of another planet? Second, I got 40 extra minutes of sleep every night. (Well, OK, really, I worked 40 extra minutes every day and actually got eight hours of sleep anyway. It was still grand.) And third, it turns out that morning people don't adapt well to these changes in their schedule, but night people like me thrive on it, so I felt great and all those people who had made me go to 7:30 AM meetings for years felt awful, and it was fabulous.

But we don't do that any more. When the eight- to ten-hour planning day fits entirely inside a Martian night, we plan a day for the rovers every day (three days on weekends). But when it doesn't -- when the data would be coming back from Mars at, say, 3 in the afternoon, so there's not time left to plan a whole day for the rovers -- we go to a schedule where we plan two days for the rovers every other day until the time wraps around again. It works out to about two weeks of every-day planning followed by two weeks of every-other-day planning.

By the way, because Spirit and Opportunity are on almost exactly opposite sides of Mars, their schedules are offset from one another: when we're planning every day for one rover, we're planning every other day for the other rover.

Further Reading

Monday, January 26, 2009

Ray Bradbury, Part 2

[Sorry, I don't have any pictures yet. I'll add them, eventually, if I ever get copies.]

Thursday, January 15, 2009, was the official JPL celebration of the MER rovers' fifth anniversary -- five years into our three-month mission, and still counting. They had a very nice televised event in von Karman auditorium, with tribute videos and with former CNN science correspondent Miles O'Brien as the keynote speaker.

But the big surprise -- and treat -- was the special guest of honor, who turned out to be: Ray Bradbury. If there's one person in the world who really deserved to be there, one person who by his mere presence could have made it the perfect celebration, it was he. We barely let our project manager, John Callas, finish introducing him before we leapt to our feet and gave Bradbury a standing ovation.

Bradbury made some very amusing and poignant remarks. Including this: "I was the first Martian." I think he's earned that title. Yes, he was.

From the moment we realized he was there, fellow rover driver Ashley Stroupe and I had the same idea: we must give Ray Bradbury a tour of the MER ops area! The instant the event was over, we swam upstream against the exiting crowd, aiming for the front of the room. There was some confusion, but Ashley eventually managed to snag him. While Bradbury taped a short video of some kind, Ashley and I (and Callas and Squyres and Frank Hartman and John Wright) headed up to the MER ops area to set something up.

We weren't up there long before they wheeled him into the room. (I didn't realize this when we were in von Karman, by the way, but he has a documentary crew following him around these days, so the whole thing is on film.) Ashley and I hadn't worked out exactly what we were going to do; we both hesitated a moment, then I stepped up. I shook his hand, introduced myself and the others in the room, and led him over to our rover model.

"This is a full-scale model of the Spirit and Opportunity rovers," I began, as his assistant wheeled him up to it. He leaned back in his chair to look the rover in the eye, and his eyes grew bigger than its. "Oh, my," he said.

I did my usual spiel, talking about the rover's cameras, and how the solar panels folded up when it rode its spaceship to Mars, and describing how the various antennae work. As I knelt to show him the wheels I had a moment of inspiration. "Mr. Bradbury," I said, "I've read that you never learned to drive a car." (True: he says he's too distracted by ideas to be a safe driver.) "So I wonder if, before you leave, you'd like to try driving a Mars rover."

I turned him over to Ashley for a while; she showed him some of the pictures spread around the walls of the room, explaining where each of them was taken and what was significant about them. These just happen to be perfect for Bradbury: color panoramic images of Mars, taken from a human's perspective, but mounted close to a wheelchair-bound man's height. It must have seemed to him that he was, for the first time, really there. On the edge of a crater. On top of a mountain. On the plains, looking at the crashed remnants of the spaceship we rode there. On Mars.

I scrambled to get our rover-driving software set up, and then Bradbury's assistant wheeled him over. I explained what he was looking at -- a 3-D model of one small part of Mars, with a simulated rover in it -- and showed him basically how to drag the rover around in the model. We'd been warned that he was getting tired even before they showed up, and you could see he was exhausted by this point, but he kept playing with it. Before long he got the hang of it and was moving the rover all over the screen.

He signed a couple of autographs and shook our hands and posed for pictures with us, and I improvised a few inadequate words of gratitude, and they wheeled him out again. Back to Earth. Forever, maybe.

Or maybe not. Now he has a new connection to that alien place, that world he's imagined for so long. We heard afterward that he was moved to tears by the experience. And to laughter, too: he and his assistants were joking about how he'd never driven a car on Earth, but now he's driven one on Mars.

Ray Bradbury is an old man now, but he's dreamed of Mars since he was young. Ray Bradbury, master storyteller, poet, visionary, creator of the dreams we make into reality -- Ray Bradbury, the first Martian -- went to Mars. On Thursday. And I helped.

I've been chewing on it ever since, and I think I've at last put my finger on what touched me most about the experience. It's this: if Ray Bradbury wrote a story about his own life -- about a man with a phenomenally vivid imagination, a born poet who dreamed of flying to alien worlds and inspired millions to work to make his dream real -- that's how the story would end. Well, in Ray's story, the old man would actually physically go to Mars, and they'd wheel him down the ramp of the gleaming metal spaceship and he'd lean over despite a sigh of pain and his frail hand would brush the soil and he'd weep with pure joy. We didn't do that for him, maybe. But we came awfully damn close.

Thank you, Ray. Thank you for everything.

Ray Bradbury, Part 1

About ten years ago, Ray Bradbury was at my favorite Pasadena bookstore, Vroman's, for a book signing. As we stood in line, they passed out Post-Its on which we were supposed to write down how you wanted him to inscribe each book -- you know, "To Billy" or "For Wilma with best wishes" or whatever.

Now, my reaction was, you mean you're telling me that I can get Ray Bradbury to sign my copy of Fahrenheit 451 however I want?! I briefly considered "IOU $20. Ray Bradbury." But then I thought of something even better. On my Post-It, I wrote, "To my very best friend in the whole wide world."

The woman handing books to Ray saw my Post-It and laughed, and gave it to Ray. He read it, laughed, and then looked at me narrowly. "Do I know you?" he asked. I said something like, "Get to know me, and it'll be true!" He laughed again.

"You know," he said, "when I was fourteen years old, I asked the great actress Marlene Dietrich to sign a photo of herself for me, and she signed it, grandly, 'To my old pal, Ray!' I still have it as a treasured possession."

Then Ray Bradbury signed my copy of Fahrenheit 451: "To my old pal, Scott! Ray Bradbury."

I still have it as a treasured possession.

(And now I'm passing this tradition along. A couple of times recently, at public speaking events, people have asked me to autograph something. I tell them the above story and then sign "To my old pal, (Whatever)!" Fittingly, the first of these was a woman who wanted me to sign her copy of The Martian Chronicles. When I opened it, I found that it had already been signed -- by Ray Bradbury. I demurred, but she insisted. So I added my signature to his.)

Sunday, August 3, 2008

You're Damn Right I Will, Takahashi-sensei

Francis Takahashi-sensei is the chief instructor at my aikido dojo. A physically imposing yet charmingly grandfatherly figure, he's one of the kindest and most patient men I've ever met. He has infinite patience for newcomers -- if he didn't, I'd never have lasted there -- and he sets an inspiring example. Despite advancing age and a couple of nearly crippling injuries, he's never given up. He's found ways -- made ways -- to continue to lead and teach, and to practice and develop his own art. Thanks to his example, I've always come back to aikido despite my own injuries. If Francis can do it, I can do it.

Today, after practice, I left the dojo and started to drive home -- and thought a little, and turned around and went back. When I got there, Francis was just leaving the building. He held the door for me.

"Did you forget something?" he asked.

"Not exactly," I said. I took off my sunglasses. Almost without choking up, I said, "I've had a couple of reminders lately that you should tell the people in your life who are important to you how much they mean to you before you lose the opportunity."

He picked up on my demeanor before my words, and before I could finish the sentence, he'd already dropped his bag and was giving me a big hug.

"So," I continued, "just in case I get hit by a bus tomorrow, I wanted to say thank you."

"You're always welcome," he said. "You're always welcome."

That was about it. I started to walk back to my car; he picked up his bag and shuffled on toward his. Then he stopped and called to me.

"If that bus hits you," he said, "hit 'em back."

Saturday, June 7, 2008

Lord of the Flies

I wasn't at the absolute bottom of the social ladder when I was in middle school, but I was close. The kid at the bottom, just a rung or two below me, was named Paul Rooney. Paul was a lanky, goofy-looking kid, with dark curly hair and a complete inability to successfully resist the horrors inflicted on him daily by his monstrous peers.

I was among the worst of these monsters, because I was supposedly his friend. When it was convenient, when I needed a friend, I was friendly with him. But I was as nasty to him as anyone else when it meant keeping him down -- you know, so he wouldn't climb past me. So I'd be nice to him one minute -- usually when nobody was looking -- and vicious the next. Paul was bullied, teased, picked on, and continually betrayed.

Thanks in no small part to false friends like me, Paul was utterly bewildered by his world, perfectly conscious of the injustices he faced but unable to rectify them. He tried, it was just that nothing worked. He'd fight back against the bullies, but he was pathetically ineffectual; they brushed him aside with a dark laugh and punched harder. He knew better than to go to the school authorities; we'd have just teased him that much worse for showing weakness, and anyway they might as well have been stone giants for all the help they'd offer a kid like him. Why should they bother? It was just kids picking on each other -- kids do that. They had real problems to worry about, like keeping the football field green.

From what little I saw, his parents were worse. I vividly remember going to Paul's house for his birthday party one year. About half a dozen of us showed up, and we mainly sat around playing his Atari. Paul left the room; we kept playing. In the next room, Paul's dad told him sternly to go back into the den and hang out with us. "Your friends are here!" his dad growled, and Paul replied in high-pitched anguish, more than loud enough for us to hear, "They're not my friends! They're not here for me! They're only here to play my video games!" The thing is, he was right. I think we were making fun of him.

The next year, Paul's parents did absolutely the worst thing, the stupidest possible thing anybody could do to a kid like that: they sent him to a military school. (Admiral Farragut Academy, if you want to know.) I imagine that his dad thought Paul just needed some discipline, or something. Possibly, they thought the environment would be better there, that kids would be protected from teasing. Or they thought it would toughen him up. Who knows.

We didn't hear anything about Paul for a year. I went away that summer to visit my dad and stepmother in North Carolina, and when I came back, there was a newspaper article waiting for me.

Paul Rooney had had enough at last. He shot his dad, his mom, and his younger brother with his dad's revolver. They all died. (Only Paul's younger sister, who was spending the night with relatives, was unharmed.) Then he drove the family van across the causeway from St. Petersburg to Tampa, pulled over, and shot himself in the head.

He left a note in the van. The note read, simply, "I'm sorry."

That was it. That was the end of Paul's torment.

The newspaper called it a suicide. We never talked about it, but we all knew that wasn't the truth. The truth was, we had teased him to death.

Sunday, June 1, 2008


The best fiction-writing teacher I ever had was Luke Whisnant. One day I was in his office, reviewing a story I'd written for his class, and he passed along an old piece of writerly advice: "You can tell a lot about a person by looking at his shoes."

Back then I owned one pair of shoes: black Converse high-tops. They were gradually disintegrating; I'd worn them every day for years, in all kinds of weather, and there were holes in the sides and the fabric was tearing away at the toes. I was ashamed of them; cheap as they were, I couldn't afford a new pair, and mainly I just hoped nobody would notice them.

"I notice you tucked your feet under your chair when I said that," Luke continued, not missing a beat. I blinked in surprise. He was right; unconsciously, I had done exactly that.

I Still Want to Smack Him, Thirty Years Later

I was six when Star Wars came out -- the perfect age, I think. I don't remember much about my childhood, but I'll always remember watching that movie for the first time: from the opening shot of the enormous Star Destroyer bearing down mercilessly on the valiant but hopelessly outgunned little rebel ship, through leaving the theater jumping-up-and-down excited.

And I stayed that excited. I wanted to be Luke Skywalker. (My much more clueful brother wanted to be Han Solo, but I digress.) I am probably personally responsible for the majority of George Lucas's ensuing fortune: my normally not terribly indulgent parents succumbed to my incessant supplications, my endless blandishments, my -- my whatever it took; they bought me the X-Wing toy, the remote-controlled R2-D2, the comic books, the dolls action figures, everything. I replayed the movie in my mind over and over, every day, obsessively.

So just imagine how thrilled I was, three years later, to hear there would be a sequel! I'm not even sure I knew exactly what the concept of a sequel was, I just knew that there was going to be another one of the greatest thing ever. In the intervening years, my parents had divorced, a deeply traumatic experience for me -- and suddenly I didn't care because there was going to be another Star Wars!

The anticipation built for months. We didn't go on opening weekend -- I don't remember why, but maybe because my mom wanted to let the crowds die down -- but at last the big day came. We were going to see Star Wars: The Empire Strikes Back.

I was practically in a frenzy, standing there in line outside the movie theater with my mom and my brother, in the hot Florida sun. As we waited, the previous showing's audience poured out. I could see in their faces as they walked by that they had loved it, that the movie was going to be awesome.

And as one guy walked past me, he said to his friend, "Wow, I can't believe Darth Vader turned out to be Luke Skywalker's father."