IR Led Modulation with Arduino
Since you're mentioning Vishay's TSOP I guess the 38Hz should be 38kHz.
I don't know the Arduino platform, but the usual way to do this is set up a timer to interrupt at 76kHz (twice the frequency you want) and toggle the LED output on every interrupt as long as a "send" flag is set.  

edit
Be sure to shield the receiver from HF fluorescent lamps; they are often controlled at +/-40kHz, which a 38kHz receiver may easily pick up. If your robot is too far from obstacles to receive the LED's reflected signal, the receiver's AGC may lock upon the lamp's "signal".
Don't worry if you can't have a heartbeat interrupt exactly every 13.16us. A small deviation may even be a good idea because the receiver's sensitivity is lower the farther from the center frequency. This means that you won't reacting to signals reflected from meters away, which commercial IR remotes tend to do. Of course you can always reduce the LED current to the same effect.