CAPE CANAVERAL, OCT. 5 -- A judge today approved a scheduled Saturday launch of the space shuttle Discovery carrying the nuclear-powered Ulysses spacecraft.

Two demonstrators opposed to Discovery's radioactive cargo were arrested.

Six hours after the launch, which is planned for 7:35 a.m., the five-man crew is supposed to release Ulysses from the cargo hold. The satellite will then rocket itself out of Earth orbit for a round-about voyage that eventually will take it around the sun to study its so-far unexplored polar regions.

Kennedy Space Center spokesman Dick Young said the mission would be unaffected in the event of a shutdown of government agencies because of the dispute over the federal budget. He said funds for the mission already had been set aside and notices had gone out that all employees were to report to work.

Since the last successful shuttle launch in April, the National Aeronautics and Space Administration has faced a string of problems. The agency scrubbed four launch attempts because of hydrogen fuel leaks and learned that there is a serious flaw in the Hubble Space Telescope.

Another problem was added to the list Thursday when workers discovered that a 9-foot, 70-pound metal beam had been left in the engine compartment of the shuttle Atlantis.

When the craft was hoisted from horizontal to a vertical position, the beam clanked around inside the compartment, causing up to 25 dents and dings. None of the damage was believed serious, officials said, and Atlantis is still scheduled for a mission in November.

The beam normally supports a platform used when the shuttle is being processed on the ground.

U.S. District Judge Oliver Gasch in Washington rejected a petition by three activist groups that sought to block Discovery's launch with its nuclear-powered payload, just as he did for a similar claim filed last year before the launch of Galileo, which also was nuclear-powered. The groups said they worried radioactive materials -- the plutonium powering the satellite's systems -- would be spread widely should Discovery explode during launch.

After Ulysses is released from Discovery, a two-stage rocket will fire and send the European-built craft streaking toward Jupiter. Ulysses will loop over Jupiter's north pole in 1992 and the giant planet's intense gravity will give it a powerful burst of speed and hurl it back toward the sun's south pole.

In 1994, Ulysses will pass within 120 million miles of the sun's south pole and about 18 months later it will pass over the solar north pole.