Photoassociation is a possible route for the formation of chemical bonds. In this process, the binding of colliding atoms can be induced by means of a laser field. Photoassociation has been studied in the ultracold regime and also with temperatures well above millikelvins in the thermal energy domain, which is a situation commonly encountered in the laboratory. A photoassociation mechanism can be envisioned based on the use of infrared pulses to drive a transition from free colliding atoms on the electronic ground state to form a molecule directly on that state. This work takes a step in this direction, investigating the laser-pulse-driven formation of heteronuclear diatomic molecules in a thermal gas of atoms including rotational effects. Based on the assumption of full system controllability, the maximum possible photoassociation yield is deduced. The photoassociation probability is calculated as a function of the laser parameters for different temperatures. Additionally, the photoassociation yield induced by subpicosecond pulses of a priori fixed shape is compared to the maximum possible yield.