The officers deny the charges
Police officers must be given the discretion to make decisions "against the background of general advice", a former Metropolitan Police Commissioner has told the Old Bailey.
Lord Condon said officers made decisions based on their experience and training and the person they were.
Metropolitan Police Commissioner Sir John Stevens and his predecessor, Lord Condon, who retired in January 2000, are accused of health and safety breaches relating to accidents involving two police officers.
The trial follows the death of Pc Kulwant Sidhu and injuries to Pc Mark Berwick after they fell through the roofs of two separate buildings while chasing suspects.
Sir John and Lord Condon have both pleaded not guilty to four charges under the 1974 Health and Safety at Work Act.
The only way to ensure the safety of officers is not to let them out of the station
Mr Justice Crane ordered the jury on Tuesday to find Sir John not guilty of one of the counts.
During cross-examination by William Norris QC, he said the "only way to ensure the safety of officers is not to let them out of the station".
He told the court he "cannot make the workplace safe" for officers because the workplace included every street and building.
"It is a case of where you start and where you finish and making a sensible practical and legal judgement around that issue."
Officers were trained not to go on roofs, said Lord Condon, unless it was necessary.
But he had not imposed a ban on going on roofs following Pc Sidhu's death.
He said officers must be able to use their discretion to make a decision "against the background of general advice.
"In many situations they may be the only person who can make that judgment," he added.
The prosecution case, brought by the Health and Safety Executive, argues that only in very exceptional circumstances is going on a roof worth risking an officer's life.
The trial continues.