added trylock and timed lock in environment openravepy