I can speak camera!

A small sample conversation I just had with one of our robot’s cameras:

FF 30 30 00 90 30 EF
FF 30 30 00 B5 30 EF
FF 30 30 00 76 31 EF
FF 30 30 00 58 30 EF
FF 30 30 00 64 31 37 45 46 35 38 33 32 30 EF
FF 30 30 00 60 32 31 EF
FF 30 30 00 60 31 32 EF
FF 30 30 00 57 EF
FF 30 30 00 B5 31 EF
FF 30 30 00 A0 30 EF
FF 30 30 00 90 31 EF

In case you’re curious, I just

  1. Told the camera to listen to me instead of to the remote control
  2. Told the camera to remove its infrared cut filter
  3. Told the camera to turn on its infrared LED illuminators
  4. Told the camera to initialize its pan/tilt pedestal
  5. Told the camera to set its tilt range to the physical maximum (-30° to +90°)
  6. Told the camera to pan all the way to the left and tilt all the way up
  7. Told the camera to pan all the way to the right and tilt all the way down
  8. Told the camera to return to the home position (straight ahead)
  9. Told the camera to reinsert the infrared cut filter and turn off the illuminators
  10. Told the camera to turn off (more of a sleep mode, really)
  11. Told the camera to stop listening to me

In every case, the camera would reply with success:

FE 30 30 30 30 EF

The third, seventh, and eighth commands can fail if they get sent too quickly after the preceding command. If I send the third command too quickly after the second command, the camera wouldn’t have time to remove the infrared filter. You can’t turn on the infrared illuminators until the filter is removed, so I’d get a mode error:

FE 30 30 39 30 EF

For the seventh and eighth commands, if I send them too quickly, I’ll get a busy signal:

FE 30 30 31 30 EF

The important part of this is toggling the night mode; our newest VC-C50i Canon communication camera has some limited infrared capability, which should help us in some of the darker parts of the USR test arena. Our older VC-C4 cameras don’t have the night mode, and have lower resolution CCDs, but they’re otherwise identical. In terms of the command language (there’s a 190 page manual on it), the VC-C50i just knows more words.

I think being able to have a raw hexadecimal conversation with a PTZ camera significantly increases my geek quotient ;o).

5 comments on “I can speak camera!
  1. tirerim says:

    Nick, you are quite ill. Please get professional help immediately. :-)

  2. ashsong says:

    After all of the experience that we got with Bruce, I’m getting much faster at writing assemblers these days.

    If you’re interested, I’d be happy to show you what I’ve done. It worked out really well for us because I found a really nice python library to do the parsing and the code generation.

    If it’s something that you’re interested in, let me know. Now that I’m back from travelling the world, I’ll definitely have time on my hands.

  3. stormwynd says:

    So *this* is what Nurdvana looks like… ;-)

  4. You’re familiar with the volatile keyword in C, right?

    (It tells the compiler, “Don’t fuck with this function/variable, even if it appears to have no side-effects; it’s there to do timing/whatever for a hardware device. Keep your grubby optimization hands the motherfuck off it.”)

  5. I think there’s something morally wrong with doing parsing and codegen in Python.

Nurd Up!